qt

How to efficiently select a subset of rows of a QTableView that match certain criteria?

I have a QTableView using a QSqlTableModel. In the underlying database (postgresql) table there is a timestamp column. How can I select all rows in the selection model where the underlying timestamp column is NULL? Pointers in the right direction would help. UPDATE: The main issue I have been having is performance. Each method I ha...

How to Create OpenGL 3 Context with Qt 4?

I would like to learn graphics programming with OpenGL. And since I will just start learning it I decided to learn the new/OpenGL3 way of doing things.As far as I can see one has to create an OpenGL 3 context for this (Core profile in the new OpenGL 3.2 if I understand this correctly). Well I thought about using Qt for this, currently us...

Is there a workaround for Qt 4.4 visual artefacts on Mac OS X 10.6 (snow leopard)

My software is written in Qt 4.4.2 using XCode on Mac OS X 10.5. It runs fine on Mac OS X 10.5. But when it is run on Mac OS X 10.6 it shows some strange visual artefacts when drawing the drop-down menus of QComboBoxes. Apparently it affects every QComboBox. 4 people with Mac OS X 10.6 who have tried it have reported the same behaviour,...

Adding a Custom Widget to Qt Designer

I've got the following custom widget: class QDESIGNER_WIDGET_EXPORT MySpecialButton : public QAbstractButton { Q_OBJECT ...etc... }; Qt Designer recognizes this widget, and I can place it onto my form without a problem. However, when looking in the property editor, only the QObject and QWidget properties are visible. How do ...

Qt auto software version?

Does Qt maintain any sort of versioning information about your program like .NET does? Like the build number? Or does it provide an easy way to access the SVN revision? ...

Can I insert a test into a qt event window?

I am attempting add some tests to an existing QT GUI application using QTest. The GUI uses quite a bit of complicated start-up code so I'd rather not write another main() to start it again. To me, it seems like the easiest way would be instantiate the app and then run the tests on it. I am just not sure, however what function I could p...

Problem with event handling on QToolButton in Linux

I am developing an application, I have added a QToolBar object in that, and have added the QToolButton object on that, I have also connect the clicked() event with that but the problem is that the mouse click event don't work on QToolButton but when I bring focus on that using Tab, then space button works fine, but I want it with mouse c...

QT: reject() closing whole app? Why?

I'm running a QT app (VS2005) and have spawned a dialog from that app, but if I add a cancel button to that dialog with a reject() slot then yes, the dialog closes and returns the correct result but my whole app closes down as well. This is annoying me and I can't find any hint as to why; any suggestions gratefully recieved ...

Adding external library into Qt Creator project

Have created a simple library using vc6 compiler which defines a class Sum with a method add which takes two parameters and retruns an int, I have included this in my QT application in the pro file as win32:LIBS +=D:\nest_qt_dev\SumLib\Debug\SumLib.lib However I get an undefined reference to `CSum::Add(int, int)' error. My Library Co...

Is there a C++ or Qt library available to measure feature use of an application

I would like to be able to measure the features in our application that are being used. For example how much certain windows are opened, certain controls are clicked. I can imagine a tool that measures this and sends a report to a web server, that can further process it to create meaningful data from it ...

Displaying WebCam video with Qt

I'm using Qt 4.5 (2009.03) on Linux Gnome (Ubuntu 9.04) and would like to display video captured by my webcam in a Phonon::VideoWidget of my Qt application. I have a first implementation using the v4l2 API where I do the YUV2 to RGB conversion and fill a QImage my self. It works well but it is not very efficient. A collegue used gStrea...

Qt-GUI with several "pages", how to synchronize the size of several QWidgets

I am currently writing a wizard-style application using Qt4. I am not using the wizard class however, since going next/back does not make sense from every step in the process. The user starts off at a "hub"-window with five buttons, each of which take him to another window at a different stage of the process. At the beginning all but th...

Qt doesn't find QStackedWidgets' slot setCurrentWidget

I am writing a wizard-style application in Qt that uses a QStackedWidget to organize the individual pages of the wizard. Now I want to switch between the pages, which should be possible using the function setCurrentWidget(...): I have a simple main class that instantiates a QWidget audioconfig. Then, it adds this QWidget to a QStackedWi...

Which window-toolkit to use for embedded linux?

Hi Friends, I am using embedded-linux for device which has Arch ARMv5 Speed 266MHZ, vfpu and 32bit bus, 32MB 133 Mhz DDR Ram. can you tell me which windowing system should I use, 1).QT for embedded linux 2). Android. 3). Other!! Well, I am using microwindows for last one year and not satisfied with it as it does not have BSP (Binary...

Setting QMainWindow at the center of screen

My QMainWindow contains a QGraphicsView, which should've minimum width and height. So, I've used the following code in the QMainWindow connstructor: ui.graphicsView->setMinimumHeight(VIEWWIDTH); ui.graphicsView->setMinimumWidth(VIEWWIDTH); Then I used following code to set QMainWindow at the center of the screen: QRect available_geom...

Architecture for Qt application with Lua scripting - pause execution.

My embedded project contains a Qt application for the PC which is mainly a simulator for debugging and testing. In the application I can create several widgets which represent either my embedded software or simulate the hardware controlled by the application or can generate external inputs for testing. I plan to improve the application ...

Qt4 QSslSocket triggers HTTP 406 responseq

I have an application that is working as a proxy using QTcpSocket to intercept HTTP requests. I'm trying to extend that to work for HTTPS as well, but it seems that it's not working how I anticipated. Using QHttp is not possible for me due to the uniqueness of the application. Currently, I have something like the following: serve...

How to hide handles in QSplitter widget?

Is it possible to completely hide handles from QSplitter widget? I've tried to hide() them but it doesn't work — handles are still on the screen and isVisible() reporting false. QSplitter::setHandleWidth doesn't work as expected — it doesn't hide handles when calling it with 0. ...

How to make Qt work when main thread is busy?

Main (function main is there) thread of my program is reserved for non-GUI tasks. It calls a number of lengthy calculation functions. All implemented GUI's have been doing their work in a separate threads. I'm now going to implement one more GUI using Qt. Qt documentation says all GUI related tasks should be done in main thread. In my ...

Handling gui with different threads

I'm new in qt and c++, and I have a problem with threads. For example, if I have a gui with two QPushButton and one QTextEdit, is it possible to set values to the QTextEdit from a thread (different from the gui main thread) without freezing the gui? // These are the values that I want to set from the thread for(i=0;i<100;i++){ ...