qt

Qt does not create output files in debug/release folders in Linux

When I build Qt applications on Ubuntu it puts the output files in the main solution folder as opposed to release/debug folders as it does on Windows. This is problematic because sometimes the output files need to be run as part of the build process (for example to run unit tests). I have an idea this has something to do with the qmake...

Qt 4.5 .NET framework dependency

I'm currently developping an application with Qt 4.5 on Windows Vista and Visual Studio 2008 as IDE. The problem is that the program crashes on Windows XP SP2 (works perfectly with XP SP3 and Vista). This can be fixed installing the .NET framework 3.5, but I want to avoid that. Is there a way to prevent that given that I have to use th...

Unresolved External (abstract class constructor/destructor)

So, I have an abstract class Panel and an implementation of it MyPanel. They look similar to this: class Panel : public QWidget { public: Panel(QWidget* parent = 0) = 0; virtual ~Panel() = 0; // but wait, there's more!! }; class MyPanel : public Panel { public: MyPanel(QWidget* parent = 0); ~MyPanel() {}; // nothing to do her...

How to know when a web page is loaded when using QtWebKit?

Both QWebFrame and QWebPage have void loadFinished(bool ok) signal which can be used to detect when a web page is completely loaded. The problem is when a web page has some content loaded asynchronously (ajax). How to know when the page is completely loaded in this case? ...

Properties editor design pattern?

Warning: This is super in-depth. I understand if you don't even want to read this, this is mostly for me to sort out my thought process. Okay, so here's what I'm trying to do. I've got these objects: When you click on one (or select several) it should display their properties on the right (as shown). When you edit said properties it ...

Link error while building with command scons compiler=msvc

Hi, I am trying to build a program using the command scons compiler = msvc. During this action a link error appears: LNK1181: cannot open input file 'QtCore4.lib'. I have installed Qt for Windows from http://qt.nokia.com/downloads (the free version) and tried to find the requested lib file, but only found the same dll file. Any advice ...

Jdesktop or Qt for better Desktop application

I will make a desktop application. I searched on web which one is better. Can someone say positive and negative sides of these components. ...

Adding properties for many widgets

I have a graphics engine, for which I have to make an editor. Editor aims to create xml file which describes how screen is constructed from layers etc. There is a lot of classes like SimpleText, Rectangle, Layer in the engine. Some of them share set of the same methods like GetWidth but many are specific to the given widget. I would li...

Regex matching spaces, but not in "strings"

I am looking for a regular exression matching spaces only if thos spaces are not enclosed in double quotes ("). For example, in Mary had "a little lamb" it should match the first an the second space, but not the others. I want to split the string only at the spaces which are not in the double quotes, and not at the quotes. I am usin...

How to detect the mouse state in Qt without a MouseEvent

Okay, using Qt, I'd like to know how to detect the current state of the mouse at any point in time - without a MouseEvent. Using QCursor::pos(), you can get its position, but is there a way to determine the current state of the buttons? Basically, I'm looking to verify the state of the mouse when a timer goes off, so it won't be relate...

Detect if stdin is a terminal or pipe in C/C++/Qt?

When I execute "python" from the terminal with no arguments it brings up the Python interactive shell. When I execute "cat | python" from the terminal it doesn't launch the interactive mode. Somehow, without getting any input, it has detected that it is connected to a pipe. How would I do a similar detection in C or C++ or Qt? ...

What rendering API does Qt use on Windows?

What underlying rendering system does the Qt GUI toolkit use on Windows? (I'm assuming it is GDI) ...

rand() doesn't obey srand() in Qt Creator

I've written a program in Qt Creator 1.0.0 (Qt version 4.5.0) where at the beginning of main() function I've put srand(time(0)); Then I'm calling rand() from another thread (subclass of QThread). In that function, rand() is producing same sequence of numbers each time I'm running the program. Why is this happening? Thanks in advanced...

Resizing Mfc dialog with embeded QWinWidget

Hello I asked my question on qt centre forum, but no answer yet. Hope someone will know something about this. I have an Mfc dialog with QWinWidget inside it. When I resize my dialog I want my QWinWidget to automatically be resized and repositioned as well. This is the code that creates the QWinWidget inside the mfc dialog : int MyCDi...

QT workflow question

I'm using QT 2009.03 with the Visual Studio addin 1.0.2. I'm writing an application that has commands to open non-modal windows, and multiple windows can be open at the same time. These windows themselves need to be designed in QTDesigner. An example of what I'm looking for can be found in Firefox. If I go to Tools / Addons it opens a c...

QT Database Interface... best place to get started?

I've been asked about using the QT database interface for Oracle. What's a good starting point for investigating this? Do you have any experience with it you can share? ...

How do I make a QVector of widgets?

How do I make a QVector (or some other container class) of a dynamic number of widgets, such as QPushButton or QComboBox in Qt 4? I've used the following in my window class's constructor: QVector<QComboBox*> foo; // Vector of pointers to QComboBox's And now I want to fill it with some number of controls which can change dynamically: ...

processEvents And Memory Leak?

Hi all, NOTE: THE CODE PROVIDED JUST GIVES THE IDEA OF THE STRUCTURE OF THE APPLICATION I have a Qt application, interfacing with external hardware. The structure is such that the class for interfacing with the hardware inherits from QObject and is composed with the main GUI thread class. Let's say the class is test.h, here is its samp...

How to terminate a QThread?

QThread::terminate() states that it is discouraged to terminate a thread by calling this function. In my program, I need to terminate a thread before it finishes execution. The thread is performing some heavy computation and I want the user to have control to stop calculation. How can I do that instead of calling QThread::terminate()? T...

Oracle Driver for Qt

Any oracle10g driver is available for QT3 ...