qt

How do I append children to QDomDocumentFragment object in qt with c++

I'm using qt 4.4.3 with c++. I want to implement a QDomDocumentFragment object, and pass it as a return value for a function. I am using it the same way as QDomElement objects, with appendChild(): QDomDocumentFragment rootnode; QDomNode initmodnode = doc.createElement("initmod"); QDomText initmodval = doc.createTextNode("4"); initmodno...

Naming convention for Qt widgets

I'm working with a group of other programmers on an open source project built using C++ and Qt. Now, we need a naming convention for widgets (and other variables generally) to use it as a standard in all of our code so that, the code gets better readability and we get better coordination between programmers. Any advice? EDIT: Am not t...

Why library name gets an additional 0 in its name?

I have this tiny Qt project with a project file like this: TEMPLATE = lib TARGET = record32 VERSION = 0.0.1 DEPENDPATH += . INCLUDEPATH += . CONFIG += shared SOURCES += recorder.cpp HEADERS += recorder.h When I compile a library from it by qmake && nmake, it results into files record32.obj record320.lib record320.dll ... Why is th...

PyQt: getting widgets to resize automatically in a QDialog

I'm having difficulty getting widgets in a QDialog resized automatically when the dialog itself is resized. In the following program, the textarea resizes automatically if you resize the main window. However, the textarea within the dialog stays the same size when the dialog is resized. Is there any way of making the textarea in the d...

How do I implement QHoverEvent in QT?

I'm just learning QT with C++. I have successfully implemented signals and slots to trap standard events like ButtonPushed(), etc. However, I want to have a function called when I mouse over and mouse out of a QLabel. It looks like QHoverEvent will do what I need, but I can't seem to find any tutorials or examples on how to implement thi...

How to bring program to front using python

I would like to force my python app to the front if a condition occurs. I'm using Kubuntu & QT3.1 I've tried setActiveWindow(), but it only flashes the task bar in KDE. I think Windows has a function bringwindowtofront() for VB. Is there something similar for KDE? ...

Problem with QVariant/QTreeWidgetItem/iterator on qt4.4.3

Hello, here's my problem: In my qt app I have this object, filled before setting up my QTreeWidget's content: QList<QTreeWidgetItem*> items; I fill the QList by this way: QVariant qv; // I need this for "attaching" to the item my linuxPackage object qv.setValue(linuxPackage); packRow->setData(1, Qt::UserRole,qv); // packRow is m...

Removing rows from QTreeWidget (qt programming)

what's the best way to remove a row (QTreeWidgetItem) from a QTreeWidget? The QTreeWidget content has been set by: myQTreeWidget->insertTopLevelItems(0, items); // items = QList<QTreeWidgetItem*> then I remove an item from my QList "items" and I try to clear/reset the QTreeWidget packList->clear(); packList->insertTopLevelItems(...

Java Swing or Java Qt?

Can someone with extensive experience with both Qt and Java Swing please discuss whether you would use Swing or Qt under Java, and why? Secondly, what is the business impact of using Qt? Is it reasonably popular or will I have a hard time finding experienced Qt developers? Are there any other business impacts I should be aware of? UPDA...

Using KDE4 localization mechanisms in pure QT4 application

Hi! I'm writing an application that is currently a pure QT4 app. It is designed to run cleanly on both Linux and Windows. However I plan to integrate it a bit into KDE in future and here come the problems with localization/translations. QT4 uses its own tr()/tr().arg().arg() mechanism and .ts/.qm files. KDE4 uses gettext and i18n/i18n...

Which way to go in Linux (Qt or KDevelop)

Which one of the IDE is good in terms of support for debugging, implementation and usabality. Qt or KDevelop? Various duplicated: http://stackoverflow.com/questions/24109/c-ide-for-linux http://stackoverflow.com/questions/86676/is-there-a-good-and-free-ide-for-cc-in-linux http://stackoverflow.com/questions/164693/whats-the-best-stab...

Numbers of ways of Rendering in Qt

Hi Can anyone please tell me how many ways are there to render a screen in Qt.Like Show() , QDirectPainter etc... ...

How to prevent memory leaks while cancelling an operation in a worker thread C++?

Currently i am working on a desktop application which consists mathematical analysiss.I am using qt for GUI and project written in c++. When user starts an analysis, i open a worker thread and start a progress bar.Everything is ok up to now, problem starts when user cancels operation.Operation is complex, i am using several functions and...

Best QT ide?

What would be the best IDE to start programming with QT framework? IDE should support linux, windows and have a good mercurial integration. ...

Painting through QDirectPainter

Hi Can anyone suggest me in detail how to use QDirectPainter class to paint a widget directly on frame buffer.I would be more helpful if you provide me a working example. Regards Vivek Gupta ...

How to compile a simple Qt and c++ application using g++ on mac os x?

I am trying to use Qt for a project in school but am running into problems. I started following the tutorials and I am running into Makefile problems. Most of the tutorials say to run qmake -project, then qmake and finally make. But when I try this I run into the error make: *** No targets specified and no makefile found. Stop. I dont k...

Porting Windows library using Qt to MacOSX, event loops

Hi, I'm inserting a hook in the MFC message loop so that the Qt events are treated, without running ->exec() on qApp (because it's blocking): LRESULT CALLBACK myHookFn(int ncode, WPARAM wparam, LPARAM lparam) { if (qApp) qApp->sendPostedEvents(); return CallNextHookEx(0, ncode, wparam, lparam); } and int argc = 0; new QAppli...

Qt goes LGPL! On Windows, is it good enough to use instead of MFC?

I just read a story I was hoping to read since Nokia bought Trolltech. Qt is going LGPL in March! This is awesome news. Who uses Qt for Windows? Does it effectively replace something like MFC? Sure, I can RTFM (and to some degree I have)... but what do people USING Qt on a Windows platform think of it? I still do quite a bit of M...

XML Schema to C++ Classes

I have to write a C++ Application (using the Qt Framework for the GUI) that can edit data stored in xml files described by a xsd schema file. Is there a tool to convert the xsd schema into C++ Classes? ...

GLWidget in QT only updating on mousemove

I am currently playing with QT trying to set up a small particle system. Therein I've subclassed the GLWidget and hacked away at it. Everything was going well until I made some unknown change and now the widget only repaints when I move the mouse (it should be doing it all the time due to the QTimer I have firing). Relevant code: Ope...