qt

Get updated size of QGraphicsView

Hi, In my Qt Application I am dynamically creating QGraphicsView(s) and adding them inside a QGridLayout. When I add first view inside grid, the view covers all the available space inside grid. Then I add second view and there are now two equally sized views inside grid. Then I add third view and there are now three equally sized views ...

QT Modeless dialog window dos'nt response to the move command

Hello all im using Modeless dialog in my application , and when i try to use the Modeless dialog move command from the MainWindow the Modeless dialog didint even show up,why ? (by the way if i remove the move command every thing works and i can see the dialog when called, i try to move it to the systray era. here somecode: M odeles...

How to change the text color of a QxtLabel

I'm checking out libqxt (an extension library for Qt) and cannot change the text color of a QxTLabel; it's driving me nuts. QxTLabel extends QFrame. QFrame doesn't know anything about text. I tried changing the palette via the Form Editor but that didn't appear to do anything either. I also tried to change the style sheet but, again...

Modify an object without using it as parameter

I have a global object "X" and a class "A". I need a function F in A which have the ability to modify the content of X. For some reason, X cannot be a data member of A (but A can contain some member Y as reference of X), and also, F cannot have any parameter, so I cannot pass X as an parameter into F. (Here A is an dialog and F is a slo...

QObject cloning

I know that Qobjects are supposed to be identities not values eg you cannot copy them and by default the copy constructor and asignment are disabled as explained in qt documentation. But is it possible to create a new Qobject from an existing one using a clone method? Would this be a logic error ? If i say QObject b; QObject a; b.clo...

Qt + poppler on MAC

Hello! I would like to create an application in Qt that uses poppler to display pdf documents. I could manage this on Windows however I cannot make it work on MAC (which is also important for me). I used this but I cannot compile this example in Qt Creator, because it needs the poppler library to be linked with the project but I can't f...

How do I toggle 'always on top' for a QMainWindow in Qt?

void MainWindow::on_actionAlways_on_Top_triggered(bool checked) { Qt::WindowFlags flags = this->windowFlags(); if (checked) { this->setWindowFlags(flags | Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint); this->show(); } else { this->setWindowFlags(flags ^ (Qt::CustomizeWindowHint | Qt::...

How to check whether value in QTable widget changed

HI, I have some data there in my tablewidget and it is editable. My intention is to take data from edited row and column. IS it possible. Is it possible to check the edited row and column. Any specific signal is there? ...

Linkage Error with Inherited Class

I have static library and another program which uses it. In the static library If I define header without inheretence it works fine. class TcpCommunication On the other hand If I use inheretence with a QT class, class TcpCommunication:public QTcpServer I'm getting linkage error when I compiling code which uses this static library...

Row and column position after itemChanged signal on QTablewidget

HI, I want to get the changed datas row and column position after the signal void QTableWidget::itemChanged ( QTableWidgetItem * item ) please help ...

QTreeView memory consumption

Hello. I'm testing QTreeView functionality right now, and i was amazed by one thing. It seems that QTreeView memory consumption depends on items count O_O. This is highly unusual, since model-view containers of such type only keeps track for items being displayed, and rest of items are in the model. I have written a following code with ...

QTextEdit with different text colors (Qt / C++)

I have a QTextEdit box that displays text, and I'd like to be able to set the text color for different lines of text in the same QTextEditBox. (i.e. line 1 might be red, line 2 might be black, etc.) Is this possible in a QTextEdit box? If not, what's the easiest way to get this behavior? Thanks ...

qapps runs well but breakpoint sometimes generates segmentation fault

I have a qApp that generates a segmentation fault only when a breakpoint is inserted in the code (I can put it at different places) and only after 4-5 breakpoint stops. Do I have a problem with my code or is this a DBG bug. the method is part of a QThread Class. Basically what I did is i took the mandlebrot example, and have 3 instan...

Programming user interface advice?

In my project I going to generate a user interface through programming. Scalability of this UI is very important requirement. So far I am using two dimensional graphics for generating the UI. I think there may be different solutions but for the moment I know only two. First one is supplying X,Y coordinates of each two dimensional graph...

Integrating Jython Cpython

I am about to begin a project where I will likely use PyQt or Pyside. I will need to interface with a buggy 3rd party piece of server software that provides C++ and Java APIs. The Java APIs are a lot easier to use because you get Exceptions where with the C++ libraries you get segfaults. Also, the Python bindings to the Java APIs are ...

Need help/guidance about creating a desktop application with gui

I'm planning to do an Desktop application using Python, to learn some Desktop concepts. I'm going to use GTK or Qt, I still haven't decided which one. Fact is: I would like to create an application with the possibility to be called from command line, AND using a GUI. So it would be useful for cmd fans, and GUI users as well. It would b...

Qtimer not timing out QT, C++

Hi, I am learning C++ and using QT. I have a small program in which I am trying to update the text of the PushButton every second. The label being current time. I have a timer that should time out every second, but seems like it never does. here's the code. Header File #ifndef _HELLOFORM_H #define _HELLOFORM_H #include "ui_HelloForm.h...

2d HUD not drawing properly over QGLWidget (using QPainter)

Hi I am trying to display HUD over my 3D game. For starters, I am just trying to display "Hello World", but I haven't had any success yet! The scene freezes / flickers once I am done. I am using Qt/C++ and QGLWdiget / QPainter to get this done. I have used overpainting example as my reference to get started. Here is what I do: overri...

How do you add annotations to an image in Qt?

Does Qt support textual annotations of images as part of its object library? ...

Can I Always debug multiple instances of a same object that is of type thread with GDB?

program runs fine. When I put a breakpoint a segmentation fault is generated. Is it me or GDB? At run time this never happens and if I instantiate only one object then no problems. Im using QtCreator on ubuntu x86_64 karmic koala. UPDATE1: I have made a small program containing a simplified version of that class. You can download ...