qt

How to wait in the main thread until all worker threads have completed in Qt?

Hi, I have designed an application which is running 20 instance of a thread. for(int i = 0;i<20;i++) { threadObj[i].start(); } How can I wait in the main thread until those 20 threads finish? ...

Import Qt resources when are main.cpp and GUI classes in dependend static lib project,

Scenario: I have MSVC2005 with the Qt Visual Studio AddIn installed. In my solution there is a project A consisting of multiple plain C++ code modules, which is built to an executable A.exe. Project A does not contain a .cpp file with a main(), but has a dependency on a project B. B is a Qt project built as a static lib. It consists o...

how to navigate to another page using QMouseEvent qt event

Hello! Please help me , I need to load one page then simulating click event to get the content of the target page. from this tutorial I figured out how to produce the event but how do I actually getting the QWebPage reference to the next page. Thanks. ...

I want to start Qt

Hi all, i wanna know the best source to learn Qt from. i found some books but i believe that videos are more appealing to me. do you have any idea about Qt learning videos ? also if you have presentation or something like that , i would be very happy. ...

QMap inheritance with QMapIterator

Hi, I made a personnal class which inherits QMap: class CfgMgr : public QMap<QString, CfgSet*> {...} I'm trying to iterate over all its elements like that: CfgMgr* m_pDefaults = new CfgMgr; // .../... QMapIterator<QString, CfgSet*> ics(*m_pDefaults); while (ics.hasNext()) { // doing my stuff } And I get the compile error: ...

Read() from file descriptor hangs

Hey, hopefully this should be my last PTY-related question and I can move onto more exciting issues. (c; Here's a set of small functions I have written for creating and reading/writing to a pty: http://pastebin.com/m4fcee34d The only problem is that they don't work! After I run the initializer and writeToPty( "ls -l" ) , 'output' from...

Get Qt to use the native Windows copy file widget

Excusing the actual folders used as an example, I want to achieve the following two widgets in Qt (the backend is similar to files, but not exactly filesystem files): folder-replace-dialog and copy-file-dialog I know Qt can do the native save-file widget (using QFileDialog static methods), but can it do the folder replace/file copy dial...

How can I debug my Qt application?

I have to debug something in my Qt application but the stack shows instructions that are not part of my code and I have 3 threads (including main) running. What is the best way to debug this? DO I need squish? Would you be able to help if I pasted the stacks? Here is the stack trace of the thread that seems to be in fault: 0 raise ...

Undefined references when trying to link Qt app with my static library.

Hello, I have a static library that I have built with MinGW, I am trying to link to that library from a Qt application. I keep getting linker errors caused by one of the object files in the library. This file actually declares a couple of Boost headers, one for use of shared_ptr and the other so I can make a class noncopyable. I belie...

How to initialize a QT thread in python

As per examples seen online, I've created a Worker thread. I'm looking for a thread to run my GUI while one thread executes my code. Worker thread is defined as: class Worker(QThread): def __init__(self, parent = None): QThread.__init__(self, parent) self.exiting = False self.size = QSize(0, 0) def __...

using qt : how to build a gui ontop of a console application ?

i have a console application that generated from bison (a parser) and i want to build a simple gui for it so i can send input from this gui to the console and get output from the console into the gui . i tried to do that using java process class but it doesnt work for me , please help me to do that using qt . ...

QPushButton FocusIn generates which signal?

I am creating a small PyQt application and got stuck up in MouseOver effect. I have a QMainWindow which has three buttons named createProfileButton, downloadPackagesButton and installPackagesButton. All these are of type QPushButton Now I have created a Label which will hold the text when someone hovers the mouse over any of these butt...

setup Qt and PyQt on mac osx so my app can also deployable on windows

Hi, I've been coding with Python and C++ and now need to work on building a gui for data visualization purposes. I work on Mac Snow Leopard (intel), python 3.1 using gcc 4.2.1 (from Xcode 3.1) I wanted to first install Qt and then PyQt. And my goals are to be able to: - quickly prototype GUI and the accompanied logic that drives the GU...

How to modify the keyboard input in QT?

Hi, The following feature needs to be implemented to our existing QT & C++ application. We have to expand the user typed abbreviations into pre-defined words(s). The functionality we need to implement is something similar to text expander. Say if a user typed "FL", this needs to be replaced to "Florida" after immediately. I was able t...

Emitting signals from other threads

I have a class which has a method that is called by the main thread and 3 other threads (2 QThreads and 1 made with QtConcurrent::run()). Inside this method I sometimes emit a signal. Is this okay or could it cause problems since I am not emitting signals that belong to the calling threads. ...

how to embed qtwebkit in non-qt windows application?

I want to embed qtwebkit in my pure c windows GUI application. Are there any examples, sample code on how to do this or is it just not possible? I know its very easy to do inside a QT application but I want to keep my development in C (which can be compiled with a free c compiler). (searched google for several days without any luck). ...

exception generated with qtconcurrent and calling QTime:currentTime

I seem to be getting an exception generated only with a thread created with Qtconcurrent::run I have a class named FPSengine which has a method named FPSengine::getData() that is called by the main thread and 3 other threads (2 QThreads and 1 made with QtConcurrent::run()). Inside FPSengine::getData() I call QTime::currentTime(). If I c...

Qt QTreeWidget preserve sort

How do you implement a preserve sort in a Qt QTreeWidget? I.e. I would like the previous order of the tree preserved as much as possible. This allows the user to do something like click the "Name" column header and then the "Date" column header, and the resulting tree shows the items in the QTreeWidget by Date and then by Name. ...

Possible to output to .doc format using Qt?

I am writing a program using Qt. I want it to output to .doc to preserve formatting but all that is supported by Qt is plain text, ODF and HTML formats. ODF and HTML will preserve the formatting but then I would have to copy and paste this to a .doc file. I want to be able to save a .doc file and not have to worry about doing this. I hav...

can I use breakpoints with try catch statements with qt creator?

if an exception is thrown inside a try/catch, can i put a breakpoint there to get into debu mode before the program exits? ...