qt

Qt tray icon window

Hi, I am using QT.QSystemTrayIcon to create a tray icon. When clicking on a tray icon, I need a window to opens right above the icon (in the bottom right corner). How can I do this? Brgds, kNish ...

QT - SvgDisplayWidget - Which ID was clicked on?

Hey, I have a gui which shows .svg file. When user clicks (or better when unclicks), the mouseReleaseEvent is called. How do I find out which SVG image in particular (the ID) was clicked on? I'd like to use is here: void SvgDisplayWidget::mouseReleaseEvent(QMouseEvent *event) {} Thanks ...

how to print the real QProcess arguments list as the QProcess excute them

How can i see in QProcess the real argument list it is processing? for debuging , i do print the QStringList before i pass its to myProcess->start(program, arguments); is there build in debugging option? ...

Qt: How to layout records in a grid? QListView or QGridLayout?

Still learning the fundamental concepts... I want to layout items that come from a database in a grid. Each item will have a custom view with a preview picture, attributes and controls. The grid can change size, i.e. 3, 4, 5 columns (large-small previews). Is this best done by adding (looping through the table) custom widgets to a grid...

QUdpSocket problem

I try to send data using UDP protocol. Is it possible to understand when UDP dont send data? Thanks a lot. I try to a servis which run into client. And they send their IP an port number in one second. Server listen them and if they dont send this message it understand that client is not connected. I do this but I cant understand when t...

Using linux sockets the QT way?

I have been googling this, but I can't seems to find it. Is there a QT way to use linux sockets? It looked like the QSocket class is used for network sockets and not for local linux sockets. Anyone knows anything about this? And maybe a tutorial to get started? ...

How can I programmatically commit data from QTableWidget, which contain some items in editing state?

How can I autocommit data from QTableWidget, that is in editing state, when I fire some command? Assume, that there is some grid and data in it (editable thorough delegate that fires QComboBox editor). So, one starting to select option in combo, but do not finish editing, then hit some button, that executes action, that uses data from t...

Qt - widget - update

Hi, I am having a widget with a push button. I want, for every click on the push button one label should be added in the widget. I am giving the code below, but is not working. I don't know why. Somebody help me? class EditThingsWindow:public QWidget { QPushButton * add; Q_OBJECT public: EditThingsWindow(); public slots: void addBut...

What determines sorting of files in a QFileDialog?

Users open files in our app through a QFileDialog. The order of the filenames is bizarre. What is determining the sorting order, and how can we make it sort by filenames, or otherwise impose our own sorting, perhaps giving it a pointer to our own comparison function? The documentation and online forums haven't been helpful. Unless i...

How to make a QGraphicsTextItem clickable ?

In the "About box" of my software, I used a QGraphicsTextItem to show the about-text. This text contains hypertext links (in the form of: <a href="http://some.random.site"&gt;link&lt;/a&gt;). The item shows up properly (hypertext links are blue and underlined). However, when I click on them, nothing happens. Here is how I created the...

Qt: QPushButton never shows up...

Hello, I'm trying to learn Qt, with a fairly simple application: #include <QtGui/QApplication> #include <QPushButton> #include <QDebug> /* -- header begin {{{ */ class BareBase { public: BareBase(); }; class BareBones: public QApplication { private: BareBase* base; public: BareBones(int &argc, cha...

Qt : how can i emmbed icons/images in the GUI in Qt framework ?

how can i embed icons or images my application is using , i don't what to hold image directory in my application root , is there any valid method for that ? ...

Qt: how can i put my main window in the background while im processing with window in forground?

Im using Qt framework , and i looking for the best method to show the user im processing something how in Qt i can: put the main window in the background and pop up window to the foreground with for example " processing " massage until its done processing the " processing " window will close and the main window returns to the foreground...

Macros to avoid heap allocation ? In this case is that bad?

Hello all, It's my first question there, and it's a noobish question :). I'm facing to a problem with C++ and Qt 4.6, because I want to factorize some of my code which is invoking some public slots of a QObject, through the QMetaMethod::invoke() method. The problem I'm facing to, is that the Q_ARG macro is defined as follow: #define ...

How to create a class that is a widget that has a QTextEdit and a QToolBar above the text edit.

My intent is to create a QTextEdit with its reach text controls. The controls I want to put in a toolbar. But I have difficulties with controling the layout. The problem is that the overlap if I put a QTextEdit in a QWidget (my class inherits QWidget) which has a toolbar. Another way I tried was the following: my class inherits QTextEdi...

Why won't my nested QEventLoop deliver all the events for my QThread?

I'm having a problem with QEventLoop. I want to create a "TimeBoundExerciser" for my unit test so that my SUT, which blocks on a QEventLoop, won't block the rest of the test cases. Specifically, my test case is to make sure the SUT terminates after a timeout. The TimeBoundExerciser basically spawns a thread, executes the SUT on that thr...

How to download by block with Qt ?

For many reasons i need to download file by piece of 1024 byte. I find nothing in QnetworkAccessManager. I can not use the "header technic" because my server don't support it. I call header technic, the tecnic who send stuff like "Content-Range: bytes 21010-47000/47022" in the header of http request ...

Pyqt tabs like in Google Chrome

I would like to have my pyqt aplication have tabs in the menu bar like Google Chrome :) Any suggestions or a simple example on how to do it? I did find these relevant link: - http://ivan.fomentgroup.org/blog/2009/03/29/instant-chrome/ ...

QT c++ draw point qpainter qgraphicscene

Hell-o all, Im new to qt and I am having trouble drawing one single point. I have a big qMainWindow that eventually calls a QgraphicsScene and inside of it I need to draw a single point, one little pixel, that is all I want, I want to use a QPainter but Im having trouble instantiating one. Any ideas?? ...

Can I use Qt without qmake or Qt Creator?

Hello, I want to program using Qt, but I don't want to use special compilers or IDE such as Qt Creator and qmake. I want to write with Kate and compile with g++. Can I compile a program that uses Qt with g++? How do I compile it with g++? Thanks. ...