qt

C++ and virtual methods overriding

Sorry for this stupid question, but I can't find an answer by myself, I'm too new in C++ :( class DBObject : public QObject { ... protected: virtual QString tableName() = 0; }; class DBUserObject : public DBObject { ... protected: virtual QString tableName() { return "profiles"; }; }; And I have this code in parent: ...

how Qt communicate to symbian ?

i want to understand how qt works under nokia symbian Os . Regards ...

Qt - How to place a QTextEdit with left and right margins in a QVBoxLayout?

How to place a QTextEdit with left and right margins in a QVBoxLayout? I could use, of course, a QHBoxLayout, place the QTextEdit into that horizontal layout in between to spacings (addSpacing(40)) and only then the horizontal layout could add into the vertical layout, but want to know if there is a direct way of doing that. ...

Declaration of struct variables in other class when obtained by getters

Hi, I am using Qt 4.5 so do C++. I have a class like this class CClass1 { private: struct stModelDetails { QString name; QString code; ..... // only variables and no functions over here }; QList<st...

Very slow remote page load performance in QtWebKit (Windows)

I get very slow load times on QtWebKit on Windows 7, through ADSL. I am using the Qt Demo Browser, on a Core2 Quad, 64 bit Windows 7, 4GB ram, 2gb processor. through a VPN. Simplest example: google search page takes ~18 seconds to load, compared to 2.5 on Chrome (cash cleared). On larger pages, with scripts etc. it is worse. I tried Qt ...

Open an external program in Qt with an attached file extension

I am making a qt application which allows the user to select a file and then upon clicking ok, start the associated program with the file already loaded. The program I want to start is java based, and I know how to use QProcess to get it to open, I don't know however how to add the file extension which the user is selecting. Any suggesti...

QMake platform scope values

http://doc.trolltech.com/4.6/qmake-advanced-usage.html#platform-scope-values On Nokia's QMake documentation it notes that there are at least 3 platform scope values: win32, macx and unix. The documentation states: In addition to the win32, macx, and unix values used in many scope conditions, various other built-in platform and compi...

Qt culture-aware QString container classes

We have a text-analysis application where the text being analyzed can be of any culture (English, Spanish, Thai, Arabic, etc.) Different cultures have different rules for strings: sorting, word breaks, determining which characters are the same, etc. How do I make Qt container classes culture-aware? For example, if I am using QMap<QStrin...

QT- QImage and multi-threading problem.

Greetings all, Please refer to image at : http://i48.tinypic.com/316qb78.jpg We are developing an application to extract cell edges from MRC images from electron microscope. MRC file format stores volumetric pixel data (http://en.wikipedia.org/wiki/Voxel) and we simply use 3D char array(char***) to load and store data (gray scale valu...

Documentation for Qt documentation comments? Qt + Doxygen?

Where can I find documentation for Qt documentation comments? I'm referring to how Qt uses a specific style for documentation comments, like so: /*! \class MyClassName \brief The MyClassName class is used as an example on Stack Overflow. This class serves a few functions, the most important being: \list \i So p...

emit signal from thread

Hi, I am writing a sample which uses thread to do some background processing. In the thread I am trying to emitting a signal. But it is not coming to slot. While connecting I checked the value of “connect()” function value , it is returning value as true. One thing to notice is in the run method I am not using “exec() “ . Please hel...

Qt Console Application Tutorial?

Are there any Qt Console Application example/tutorial? I am looking for one that utilize the event loop. Most of the examples I have seen does not use the loop. ...

Qt - QTimeEdit as a timer viewer

I have a QTimeEdit which I want to set to some value and the each second I want to decrease by 1 the value that shows the QTimeEdit. So when it will be 0, the I want to have a QMeesageBox that says "Your time is off.". Can I some how do this with QTimeEdit interface, or I should use QTimer? ...

QT: View class hierarchy of any project (based on object instances or ... )

Hi, Is there any way to view class hierarchy of any QT project graphically? (Project made by using QT-Creator.) I have a big code bundle .. very badly managed code. I need to start working with it. but first I need to study it nicely. Some tool : Class viewer like one in VC++ (.NET)!? I want the QT project class hierarchy, look like th...

Qt: QTextEdit::setTextFormat(Qt::LogText) does not exist anymore, what else can I use to log?

Hi, I need a text logger in my C++ application, QTextEdit used to have this feature until Qt 3.3 but unfortunately it has been removed. Is there an alternative that I could use? Tanks for your help! ...

how to load page in the background in Qwebkit?

im using Qwebkit to load heavy html page but mean while i don't what to show the user blank page , how can i in QT load the html page in the background and in the mean while show another HTML page in the same QwebKit widget ? ...

connection mssql with qt

How can I connect mssql with Qt ? Thank a lot. ...

qt - how to enble dragging in QGraphicsScene

I am trying to put two pictures in the QGraphicsScene as one is fixed, and the other one is movable. But I succeed only in put those pictures in QGraphicsScene, I can't move them. Can anyone tell me how to achieve this. ...

What kind of good approaches do C++ programmers use for storing error messages?

Say I have a huge amount of code and have different kinds of error messages. For these, I want to have a separate place where I store error codes and error messages. For example, for an error that occured because the program could not open a file I store: F001 "Can not open a file." "The same error message in another language" "The s...

Get the current operating system during runtime in C++

I need to figure out the operating system my program is running on during runtime. I'm using Qt 4.6.2, MinGW and Eclipse with CDT. My program shall run a command-line QProcess on Windows or Linux. Now I need a kind of switch to run the different code depending on the operating system. Thx ...