qt

How do I properly implement a "minimize to tray" function in Qt?

How do I properly implement a "minimize to tray" function in Qt? I tried the following code inside QMainWindow::changeEvent(QEvent *e), but the window simply minimizes to the taskbar and the client area appears blank white when restored. if (Preferences::instance().minimizeToTray()) { e->ignore(); this->setVisible(false); } A...

Multiple instances of browser in Webkit

How to open multiple windows in Webkit Qt and set the latest opened widow to active window and all others to background. ...

How to customize a listview in Qt

I want to customize a listview in Qt, can anyone provide me some example or hints of how to do it? I am new to Qt. ...

RTSP Client with Qt GUI

Hi, does somebody have instructions, how do to make a RTSP client with Qt? I have already heard of live555, but I don't know how to link it with Qt. Is there another way? I would like to do it with Qt, so that it also runs under Linux and other platformens. ...

How to compile Qt 4.6.3 for Windows Mobile (Windows CE) under Windows?

LNK1112: module machine type ' X86' conflicts with target machine type 'THUMB' I'm trying to build Qt for Windows CE/Windows Mobile and I'm following this guide: http://doc.qt.nokia.com/4.6/install-wince.html These are the steps I took so far: I downloaded qt-everywhere-opensource-src-4.6.3 Extracted to C:\Qt\qt-everywhere-opensourc...

QMapIterator declaration of several lists problem

i'm having 3 types of lists, and i'm trying to print them according to attribute_type. so according attribute_type the iterator is chosen. the problem is if for example attribute_type == "pis", the if condition is executed but when finished it returns to the upper decleration: QMapIterator it(pit.item_parameters), so this way the iterato...

Set an icon for a file type

I have used Qt Creator and created my.exe file and a new extension ".newext" and have manually associated .newext files to the my.exe like this. The exe file has as its icon which is square figure and named myIcon.ico. I have described in myapp.rc file the icon like this: IDI_ICON1 ICON DISCARDABLE "myIcon.ico" A...

Is there a way to detect when all child items within a QTreeWidgetItem have been marked 'hidden'?

Is there a preferred way to detect when all of a QTreeWidgetItem's children are marked as hidden? Currently, I'm iterating over all of them every time any of them are hidden. ...

Using QtMobility/Location, a Symbian Qt C++ application runs in emulator but not on device.

I have a Symbian Qt C++ mobile application that runs fine in the emulator but when the application is compiled into a SIS file and installed on the phone, it installs successfully but does not start and fails silently without any message. The application uses QtMobility 1.0.1 to access the Location API. ...

How to change the Keyboard Layout on MAC OSX programmatically?

My Qt app supports changing input language on Linux and Windows. I want to add support for changing input language on MAC OSX, too. But unfortunately I don't have any information about MAC SDK. (My first and last work with MAC OSX was compiling Qt and compiling my app!) I googling this problem and found that I need to using Text Input So...

QLocalServer with multiple clients -- proper handling

I'm trying to make IPC work between one server to accept requests from multiple clients with Qt 4.6. All is working, except that the underlying named pipes are not being closed, making Qt to emit the maximum handle reached message (62). Since I want to accept several client connections, I handle newConnections to the QLocalServer class ...

How to implement HMAC-SHA1 algorithm in Qt

Hi. I'm trying to implement HMAC-SHA1 algorithm in my C++/Qt application. I have a method for Sha1 algorithm available, I just need to understand the HMAC part of it. This pseudocode is from wikipedia: 1 function hmac (key, message) 2 if (length(key) > blocksize) then 3 // keys longer than blocksize are shortened 4 ...

How to know that widget is currently is running in Qt Designer

How can I in code of the custom Qt widget know that it is currently instantiated in Qt designer? Use case: I build a complex custom widget that has several child widgets like QPushButton, QLabel etc. As application logic require, when widget is created most of those sub component are not visible but in design time when I put it on a ...

What's difference between class QWebView; vs. #include <QWebView>

What's difference between these defining; #include "QWebView" class QWebView; ...

İs it important to declare the namespace with QT_BEGIN_NAMESPACE .. QT_END_NAMESPACE

What is the effect of QT_BEGIN_NAMESPACE? QT_BEGIN_NAMESPACE class QLineEdit; QT_END_NAMESPACE If I dont use the class declaration like that, is there any problem occure? ...

How to detect user inactivity in Qt?

How can I detect user inactivity in a Qt QMainWindow? My idea so far is to have a QTimer that increments a counter, which, if a certain value is passed, locks the application. Any mouse or key interaction should set the timer back to 0. However I need to know how to properly handle input events which reset; I can re-implement: virtual v...

Crash on Windows 7 but running on XP

Hi, i've written a small application using c++, Qt and Visual Studio 2010. It's working on Windows XP (32bit) but it crashes on Windows 7 (64 bit) right after start-up. I see a "The program has stopped working..." error. Do I have to recompile the application for Windows 7? And is it possible to get more information why it crashes? Tha...

cannot open output file debug\serbest.exe: Permission denied

I compile a Qt program with C++; I got this error message: cannot open output file debug\serbest.exe: Permission denied collect2: ld returned 1 exit status what are these command's meaning? What to do for get out of the errors? ...

Album -art display

Does anybody know how to display album art / cover art in Qt? ...

Extract a tar.xz in C/C++

I am writing a program that downloads tar.xz files from a server and extracts them in a certain place. I am struggling to find a away of extracting the tar.xz file in the certain place. I am using Qt so a more Qt-way of doing it would be useful, but I don't really mind. ...