qt4

how to compile QVFB for embedded-linux-QT4.5 development on PC ?

Hi Friends, How can I compile QVFB for embedded-linux-QT4.5 ? Thanks, Sunny. ...

Howe can I retrieve the correct image with correct alpha channel from QMimeData

If we drag or copy an image with alpha channel to a application / clipboard it lose the alpha channel using Qt. Using: QImage clipImage = pMimeData->imageData().value(); gives us 32 bit image with black background where it suppose to be transparent. The format of an image is always QImage::Format_RGB32. I tried to convert it to QImage::...

Waiting for a DBus service to be available in Qt

With a Qt DBus proxy built on QDbusAbstractInterface (via qdbusxml2cpp), what's the best way to handle the service/object you want to interface to not being available when you start? Note: I'm not interested in simply knowing it (you can use BlahService.isValid() to find that out); I want to be able to know if it's valid, and know when ...

PyQt4 on Snow Leopard in 64 bit

I just compiled the latest preview of Qt4.6 on Snow Leopard in 64 bit without any major issues. http://qt.nokia.com/developer/qt-4.6-technology-preview#download-the-qt-4-1 Now, I am trying to do the same for PyQt4.6 with the latest snapshot from the River Bank website. However, the compiler exits with the following issue: g++ -c -pipe...

Is qt-embedded-linux drawing library fixed point ?

Hi Friends, I am working on embedded device which does not have Floating Point Unit, I want to port QT-embedded-linux to it. So Please tell me that whether drawing library of qt has fixed-point or not? Thanks, Sunny. ...

QFontMetrics::leading() returns 0

Hello guys, Why next function returns 0 ? (My environment is: Windows Vista, vc++9, Qt4.5) int func() { QPushButton button("Blah blah"); QFontMetrics fm = button.fontMetrics(); return fm.leading(); } Calling to "fm.height()" returns reasonable results (16 px in my case). Calling to "fm.lineSpacing()" returns same resu...

QWT plugin for QT 4.5

Hi, I have gotten the latest QWT 5.1.2 for QT 4.5 and managed to get it to complie. I am now trying to get the plugin to work in QT Designer (with VS intergration). I have placed the plugin files into the plugin/designer folder, but when attempting to load, I hit this error Cannot load library qwt_desginer_plugin5.dll: The specified mo...

destructors in Qt4

I'm very confused about using destructors in Qt4 and hope, you guys can help me. When I have a method like this (with "Des" is a class): void Widget::create() { Des *test = new Des; test->show(); } how can I make sure that this widget is going to be deleted after it was closed? And in class "Des" i have this: Des::Des() { ...

Change compilation flags in Qt under Mac OS X?

I installed Qt for Mac, and am compiling my Qt project after adding in the .Pro file CONFIG(release, debug|release):QMAKE_CXXFLAGS += -O3 -fomit-frame-pointer to optimize for speed. However, I always see that the command where g++ is ran, includes -Os, which optimizes for size. I would like to remove it. I tried several approaches, ...

Why "Follow symbol under cursor" does not work in QT Creator for Mac OS X?

Hi I'm using QT Creator under Mac osx, but "Follow symbol under cursor" option, to allow me to jump for class and methods' definitions, does not really work... it only works for local symbols. neither does "Switch between method declaration/definition" any ideas? thanks much for any thought Lior ...

HTML and CSS in Qt4 (which) widgets?

Can somebody tell me where in Qt gui can I use HTML? Which widgets do support HTML? Or more specific: why HTML doesn't work in QTreeWidgetItem and QTreeListItem? I'm trying to make some of the text in QTreeWidgetItem italic or different colour and I can't do it with HTML, it is not interpreted at all, I just see HTML code in tree ite...

Trouble using Qt with Visual Studio

I am looking to do Qt development with Visual Studio 2005. I have built the Qt libraries for Visual C++ and have downloaded the Qt plug-in using the steps outlined here. I've set the QTDIR environment variable to point to the newly built Qt environment (C:\Qt\vc). However, when I start Visual Studio, I get the following message: Th...

Turn off opaque resizing of QMainWindow / QDockWidget separator

Is it possible to turn off opaque resizing on QMainWindow / QDockWidget separators? (i.e. the central widget only resizes once the separator is dropped, and not during the drag.) ...

Qt 4.5- cannot compile lphonon ( media module) application

I am trying to compile media player sample application in qt 4.5 sdk using qtcreator. I cannot compile them in windows as well as linux, in case of linux, this is the error: Starting: /home/varun/qtsdk-2009.03/qt/bin/qmake /home/varun/qtsdk-2009.03/qt/examples/phonon/musicplayer/musicplayer.pro -spec linux-g++ -r Exited with code 0. Sta...

PyQt4 style QTableView/QTableWidget cell to look like horizontalHeader

Hi folks, I'm having to create a custom table manually with Qt4 (I need 2 header rows/columns). To do that, I've disabled horizontalHeader/verticalHeader's, and have created the header rows. Now, I'd like to style those table cells like the header cells are styled, but I don't see how to do that. Anybody able to help? TIA Mike ...

Using QFileSystemModel in a QCompleter

How does one use QFileSystemModel in the context of a QCompleter? It looks like a better choice than QDirModel as it is non UI-blocking. The following snippet doesn't seem to do anything. QLineEdit* l = new QLineEdit ; QCompleter* c = new QCompleter ; QFileSystemModel* m = new QFileSystemModel ; m->setRootPath( "c:\\" ) ; c->setModel( m...

Trying to make SDL widget in QT4 using SDL_WINDOWID, but can't get widget to show

Hi all! I'm trying to create an SDL drawing canvas inside of a simple QT4 window, following the information provided in the SDL wiki and in another question on this site. The project is an NES emulator using QT and SDL that a friend and I decided we wanted to try creating. Currently, I have a main_window class that will contain the SDL...

PyQt4 Highlighting

Hi, I'm trying to add some syntax highlighting to a text editor in PyQt4. I've found an example in the documentation which works find when compiled from C++ but when i convert it to Python/PyQt it no longer works. The part of the code that fails (no longer highlights anything) is: def highlightCurrentLine(self): extraSelections =...

most effective row removal strategy for QStandardItemModel

Hi all, I have a QStandardItemModel with several 100,000 records of data, and a QSortFilterProxyModel on top of it for filtering and sorting capabilities. I want to remove a substantial number of records, say 100,000, based on the value of one of the columns. The current implementation iterates over the source model, tests for the valu...

Qt4.5: Implicitly shared QImage: are methods like .bits() always copying (documentation unclarity)

I am writing a Qt application that has to handle big QImage s. QImage uses implicit sharing, which means it reference counts an internal data pointer. Whenever the refcount is > 1 the object counts as "shared" and any even only potentially data modifying call issues a deep copy of the image data. In short: I don't want deep copies to h...