qt

How do I controll clipping with non-opaque graphics-item's in Qt?

I have a bunch of QGraphicsSvgItem's in a QGraphicsScene that are drawn connected by QGraphicsLineItem's. This show's a graph of a tree-structure. What I want to do is provide a feature where everything but a selected sub-tree becomes transparent. A kind of "highlight this sub-tree" feature. That part was easy, but the results are ugly ...

Qt: doesn't cause memory leak?

I was looking at Qt example here: and inside the constructor, they have: Window::Window() { editor = new QTextEdit(); // Memory leak? QPushButton *sendButton = new QPushButton(tr("&Send message")); // Memory leak? connect(sendButton, SIGNAL(clicked()), this, SLOT(sendMessage())); QHBoxLayout *buttonLayout = ne...

Smooth text animation (Marquee text effect) using QT

I have a question about how to make marquee text smooth (using Qt 4.5.3) on not powerful hardware (Atom N270 + Intel 945GSM). My approach is as follows: I draw my text (36px Arial bold) onto a QPixmap (off-screen paint device) I set a timer to shift 1px content to left in each 30ms. When onTimer event is triggered, I make a selection...

How develop a financial software in Qt?

I want to create a little finance-software for my association. I want to keep it simple and easy-using, creating new persons should be possible, and every person has entries and costs. The programm should calculate the sum in every step and the total of every person. Now my question: What is a good way to realize that? I thought about SQ...

"QSqlDatabase ob" crashes in QT!!!

in my development pc, the line "QSqlDatabase ob" doesn't crash & works just fine. But in a fresh pc moved the exe and it crashed but if i comment the above line and prepare the exe again it runs fine. So I installed things that are required in the fresh pc to run qt from visual studio 2005, just to check whats the problem. Transferred t...

Problems with Multiple QApplications

Hello, Can someone help me understand what are the problems in running multiple QApplications on Qt for Embedded Linux? Please point me to some documentation of mailing-list threads. While going through some of the mails in mailing lists, I have seen some comments which say that, running multiple QApplications in Qt is not supported by...

Moving Qt UI code out to separate class

I'm just starting with Qt. Despite spending sometime on it this evening, I'm struggling to move my UI setup code out of main into it's own class. #include <QtGui> int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget *window = new QWidget; QLabel *hw = new QLabel(QObject::tr("Hello World!")); QHBox...

qt - pyqt QTableView not populating when changing databases.

I'm trying to allow my users to pick which database to open. Each database will have the same schema. For some reason though I can't get my QTableView to populate after I open the database. I'm paraphrasing the example code but this should give you an idea of what I'm trying to do. works: class aMainWindow(QMainWindow, Ui_MainWindow):...

PyQt and MVC-pattern

hi there, please, help me with designing MVC-pattern with PyQt. i want to split all program at 3 parts: 1. some class that is abstracted from all Qt classes(model) 2. some class that provides data from model to qt-app(controller) 3. Qt-app itself with defined method SignalsToSlots that connect signals with controller. is it optimally a...

Qt in a professional setting

While I have played with parts of Qt in the past I am thinking of putting some real effort into learning it but also wondering what the potential monetary payback might be down the road. So I have some general questions about Qt's future. What is Qt's place in the job market? Are there many, or do you sense a growing number of install...

How to style QTabBar close button

Is there a way to assign CSS style for the QTabBar close button? Normally QTabBar can be styled, but I can't find its how button can be referenced from CSS. ...

C++/Qt download file in sync

Hi I want to achieve to download a file in a separate thread and store that file, but I was not able to find an appropriate way to achieve this without evil delay (quite frequent download of small files, so signal+slots are too slow). What I want to achieve: (Pseudo Code) request file; wait for download finishing, timeout or error; save...

Where is qembed tool in QT4.5?

Or how could i embed .qm files into my application? I'm using qt-creator. Thanks. ...

building QT (2009.04) with VS2008 (on XP)

Has anyone managed to build the latest QT (2009.04) with VS2008?. I am having problems building QT I configured QT by running this command: C:\Qt\2009.04\qt>configure -no-sql-sqlite -no-qt3support -no-opengl -platform win32-msvc2008 -no-libtiff -no-dbus -no-phonon -no-phonon-backend -no-webkit When I run nmake, this was the output (...

QComboBox inside QTreeWidgetItem

Is there something similar to the (PyQT) QTreeWidgetItem.setCheckState(0, Qt.Checked) but for the combo box? I can't see anything in the reference, so how can I insert a custom QComboBox as one of the elements within QTreeWidgetItem? ...

STL or Qt containers?

What are the pros and cons of using Qt containers (QMap, QVector, etc.) over their STL equivalent? I can see one reason to prefer Qt: Qt containers can be passed along to other parts of Qt. For example, they can be used to populate a QVariant and then a QSettings (with some limitation though, only QList and QMap/QHash whose keys are s...

Pointer won't return with assigned address

I'm using Qt Creator 4.5 with GCC 4.3 and I'm having the following problem that I am not sure is Qt or C++ related: I call a function with a char * as an input parameter. Inside that function I make a dynamic allocation and I assign the address to the char *. The problem is when the function returns it does not point to this address any...

How do I make tab control take over entire window in Qt Creator?

I want a tab control to "dock" to the entire window panel, in Qt Creator. Now in Winforms and WPF this is super easy but in Qt its not working. I've tried all the layouts, grid layouts, etc etc. it's just shrinking the tabs not making them grow to fill. So please test a solution before telling me what the SHOULD BE OBVIOUS answer is c...

Qt: New student to Qt questions

I've got a class I've written, and I'm trying to connect it to Qt. I've got some "best practices" questions I hope you all can help me with. When creating a mainWindow to contain data, I inherit the header file into my custom class specified above, so I can make use of the elements created within Qt Creator. Is this the proper way of...

Porting Nuclues Grafix GUI to QT

I am trying to port/re-write GUI made using Nucleus Grafix to QT on Linux.In Nucleus code there is a control class which is the base class for the rest of the controls like Button,Editbox, radiobutton etc.This base class uses Nucleus API's and control structs to maximum.My question is whether to port/re-write the base class or make the c...