qt4

Loading a simple Qt Designer form in to Pyside

I create a simple form in Qt designer and am trying to load it in to a Qt application I'm creating with PySide but without much luck. Here's the generated code from `pyside-uic': # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'clientEditorForm.ui' # # Created: Tue Nov 3 23:46:41 2009 # by: PySide ui...

Polished UI Desktop Application, which UI library to choose?

I am a long time MFC programmer and know it quite well. Recently we are planning for a large desktop application. In order to beat competition, one requirement is polished UI. We narrow down the choices to three: WinForms MFC QT4 We looked at some big WinForms applications, such as Paint.Net, and feel that it still lacks power of pe...

DllMain and Qt Mfc Migration

Hello I am using the Mfc to Qt migration solution, to migrate my Mfc plugin to Qt. My Mfc plugin is loaded in third party Mfc app. Basically I am using the following example Qt based Application Extension : BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID ) { static bool ownApplication = FALSE; if ( dwReason == DLL_P...

Hiding a QWidget on a QToolbar?

Hi, I have directly added some QWidgets to a QToolbar but simply going widget->setVisible(false) did not work. Can someone please give me an example of how to show and hide a widget that is on a QToolbar? Thanks! ...

transition from MFC to QT

Hi Currently our all GUI component are written in MFC, Out build environment is : VC 6 Windows XP I have no idea about : 1) If we can replace all MFC components with QT, without changing build environment ? 2) Will Qt work with VC6 as any other library ? You answers will help me in getting started, In mean time i have i...

Showing two windows in QT4

A friend of mine and myself are working on this application for QT4. Each of us has created parts of the gui that work. I am trying to integrate his work into the main window of the gui (his work is another form that should load up). As of now this is the code I am using to try and load his second window: //connect buttons and such c...

how do i place QTableWidgetItem Icon in center of cell

i want a table cell to have just an icon without any text. i see the QTableWidgetItem class has a method to align the text (int QTableWidgetItem::textAlignment () const) i find no way to adjust the placement of the icon (which seems to get stuck on the left -- even where there is no text in the cell) look at the Status and Energy colu...

QtScript -- script-side callback through C++-side implementation

The solution may be simple. Then again it may not be possible. I have the base callback class: class CFCallback { int command_; int transfer_rate_; public: CFCallback(int command, int transfer_rate = 0) { command_ = command; transfer_rate_ = transfer_rate; } virtual ~CFCallback() {} virtual void operator...

How to block execution of same exe file already running?

I'm building client/server apllication on QT. I just want user to execute only one application per a machine. I've heard MUTEX can be used for those kind of situation. Does anyone get some tips on MUTEX or anything else? Thanks. ...

Convert video file to TIFF with ffmpeg.dll or avcodec.dll? Is "on-the-fly" possible?

I want to create a program, which gets a video-file from Qt, converts that video file to TIFF-files and sends them to an algorithm which handles these TIFF-Files. My questions: is it possible with ffmpeg or avcodec not to convert a video-file to TIFF-files first on harddrive and send them to the algorithm after that, but to convert f...

QObject::findChild returns wrong address when used with a custom widget plugin

When I call QObject::findChildren(), the address I receive is not the right address but it points to an exact copy of what im looking for. This error happens for the only case where im trying to find a custom widget plugin I have created. Whats up with that...do i need to add something to the plugin project? ...

How to decode "application/x-qabstractitemmodeldatalist" in Qt for drag and drop?

I've created a child class of QTreeWidget that I want to be able to drag items from another tree widget too (I want to handle the insertion myself though), as well as from a QListWidget. I've overridden the dropEvent method in my class, and it looks like the mimetype of the data I'm getting from my QTreeWidget is application/x-qabstract...

QSqlDatabase::transaction and other open transaction, block or fail ?

I am dealing with Sql Server and Oracle through Qt, when using QSqlDatabase::transaction() on a database connection. When another user/connection has a transaction open on the same database does the transaction() call block until the other transaction is finished or fail ? ...

PRECOMPILED_HEADER and Subdirs template on Qt

Hi All, I have a big Qt project, splitted on several static libraries (around 70) and one application, and for that I'm using a .pro file with the subdirs template. To speed up the compilations time, I want to use precompiled headers and found that using the PRECOMPILED_HEADER on each sub-project does the trick, BUT, every project co...

Qt widget update later but when?

I'd like to know what happens exactly when I call a QWidget's update() method. Here is the documentation: http://doc.trolltech.com/4.5/qwidget.html#update This function does not cause an immediate repaint; instead it schedules a paint event for processing when Qt returns to the main event loop. This permits Qt to optimize fo...

Drag & drop with .ui files

Hi, I'm having big troubles with drag & drop. I've created a new Qt Designer Form Class in which I have one QListWidget and one QWidget. Now I want to enable dragging & dropping between these two widgets. The problem is, where can I add dragEnterEven(...), dragMoveEvent(...) etc. functions? I only have these class.h, class.cpp and clas...

Getting only one dimension of indexes from the getSelectedIndexes function in QT?

I'm working on a small project in QT (well, pyQT4 actually, but it shouldn't matter too much) and I've run into the following problem. I have a QTableView with several rows and columns. I have set the selection mode to be rows only. When I call getSelectedIndexes() on my QTableView, I get an index for every row and column, which in the c...

QT Designer --- Designer.exe is Always crashing whenever I start it, the crash is also related to a call to QtCore4.dll , Any Suggestions ?

I am a newbie who is trying to use the QT creator, I installed the latest version "qt-win-opensource-4.5.1-mingw". Everything was working fine except for launching the QT Designer .. I don't really know what is the exact problem .. but whenever I try to edit my project visually or even to launch the QT Designer itself, the windows pops u...

‘QSqlDatabase’ was not declared

Hi, I am very new to using QT4. I am trying to use sql in an already working application. However, when I try to compile I get this error: "‘QSqlDatabase’ was not declared in this scope." Here is the relevent code: #include <QtSql> QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); db.setHostName("bigblue"); db.setDatabaseName...

Qt (Creator) with WinSocks (ws2_32)

I want to use an older code-fragment in my Qt-project, which is using WinSocks. I created my program with Qt Creator and I don't know, how I can link to the ws2_32-Library. I already added LIBS += -lws2_32 to my .pro, but nothing happened. So how can I link to this library? edit: Where can I find the ws2_32.lib to include it? Do I have...