qt

problem in Tab background

In my QT application,i set a background color for main widget.And when i am running the application in KUBUNTU,background of tab which i am using in my application is the same of main window,but when i run the application in windows,the tab's background becomes white and cant display anything on tab area. Can anyone tell me a solution??...

Change system date on Windows using Qt

Hi, What is the most appropriate method to change the system date (on Windows) programmatically using Qt4. I'm using Qt Creator 1.3.1. ...

Setting the HTTP headers for XmlListModel in QML

Is it possible to set HTTP headers for an XmlListModel in QML? Suppose you want to use an XML feed which requires an API key as the data source for a list model. I can pass the API key as an URL attribute, but it would be more elegant to pass it in the HTTP headers. I didn't find anything in the documentation about this. Is it possible t...

how to stop repainting of a widget when it's resized

hello i am making a software in which paint event painting a widget as per my need but the problem is that when i re-size my application window it painted it again so please tell me the way to stop paint event from painting my widget on resizing the main window. my file are: v_lab.h(http://qt.pastebin.com/tjHAWkPH) v_lab.cpp(htt...

I want qt window to resize proportional

Just as the title said, when I resize the window, if I make it widen , I want the window's height resize proportional to make the window has the same ratio. I just do the logic in paintEvent, but it doesn't work fine, can some guys have any solution? I don't think do resizing in resizeEvent is a great way, the best result is that window...

msi.h for mingw

I have a C++/Qt/mingw app and would like to use msi.h (Microsoft Installer interface), but mingw does not seem to provide this header. How can I do this? ...

Opening a file from a Qt URL

I'm coding a small and basic error tracker with Qt. The whole application is in a QTable. Each error is linked to a file ; so, one of the columns of my table deals with that. I have a QLabel and a button next to it ; you click on the button to select a file, and then, the label displays the name of the file. What I'd like to do now : t...

Suggest me a good Open Source Game Engine

Hello i want to develop some game and i am at a beginner level. so when i searched it on Google a long list of various game engines (like Delta 3D,Panda 3D) comes and when i looked at wikipedia it also showed a very large list so i am confused that from where i start. So suggest me a good game engine and some good tutorial or a ...

Put in the KDE SystemTray in the QT

Hi I'm designing an application platform and want to integrate Linux in particular for the KDE desktop only independent bookstores that if I use KDE and the QT libraries the look and feeling not like and I have all the power of the KDE libraries. The problem is, I want to be an application platform that includes the libraries to compile...

Global Variables in Qt

Hi I want to make a global variable in Qt. So I wrote a singleton class. But I am getting the following errors :: error: symbol(s) not found, :: error: collect2: ld returned 1 exit status I am using the following code : CityBookGlobalVariables.h: class CityBookGlobalVariables { private: CityBookGlobalVariables(); CityBookGlo...

QAbstractItemModel for QMetaObject, do I have to write it myself?

A suite of data models built on top of Qt's reflection system seems like a natural synergy, but I haven't found such a beast in the Qt library itself or from a 3rd party. Does anyone know if such a thing exists? I'm look for data models for editing and displaying a collection of QObjects QMetaObject properties. I can kind of understand ...

Qt and Jpeg plugin problem

Hi! When I try to save pixmap in jpg format then I get an error in console QJpegHandler: unable to write image of format 7 and the result image is corrupt. How to fix this problem? Qt 4.6.2 on windows mobile. On symbian it works fine without any problems. Thanks in advance. ...

Qt Drag&Drop with own widgets?

I created a little widget on my own, including a QProgressBar and a QLabel in a QVBoxLayout. It has also a function which returns the text of the label (self-created). Now in my MainWindow I have two other QHBoxLayouts and I want to drag and drop my widget from one to another. It also works when I click on the little free space between t...

Qt: Mobility GeoLocation works on Simulator but not on N900

I use the following code to get GeoLocation for my app QGeoPositionInfoSource *source = QGeoPositionInfoSource::createDefaultSource(this); if (source) { source->setUpdateInterval(1000); // time in milliseconds source->setPreferredPositioningMethods(QGeoPositionInfoSource::AllPositioningMethods); connect(source, SIGNAL(positi...

customizing .pro file in QT Eclipse

Hi, I'm considering using QT Eclipse integration (Helios-CDT/Windows) instead of QT Creator. One of the must-have features is an automatic synchronization of .pro file with project contents (sources and headers). It's nice it's already there (The "Add files to QT Project" dialog on resource addition/removal). The problem is - this featu...

Debug Qt signals, slots and connections

Is there a way to see which signals are fired, and if there is a slot connected to them? Ideally, we'd like to see all signals, not just those of a particular class or method; e.g. QSignalSpy only allows us to track specific signals of specific instances. In our application, we've seen performance problems because of a signal being emi...

QByteArray to char*, sending with libcurl

I'm having trouble with saving a QPixmap to QByteArray, then writing it to char*. For example i'm trying to write to a file with ofstream. QByteArray bytes; QBuffer buff(&bytes); buff.open(QIODevice::ReadOnly); pixmap.save(&buff, "PNG"); QString str(by...

How do I create a pause/wait function using QT

Hello, I'm playing around with QT and I want to create a simple pause between two commands. However it won't seem to let me use Sleep(int mili); and I can't find any obvious wait functions. I am basically just making a console app to test some class code which will later be included in a proper QT GUI, so for now I'm not bothered about...

C++ function parameter as reference

Hi, I have a question. Can anyone tell me why someone would declare parameter r like that ? Whats the difference between Record& r and Record(&r) ? QDataStream& operator>>(QDataStream &s, Record(&r)) { } Thanks :) ...

qmake: How to avoid having version numbers in .so file name

Hello, I'm trying to build a dynamic library on Linux using qmake. Here is my .pro file: TEMPLATE = lib TARGET = sqxUiBase QT += core gui CONFIG += dll INCLUDEPATH += ../../public/include DEPENDPATH += . UI_DIR += ../GeneratedFiles RCC_DIR += ../GeneratedFiles CONFIG(release, debug|release) { DESTDIR = ../lib/relea...