Questions tagged [qtgui]

QtGui module extends QtCore with GUI functionality. It has collection of classes useful for creating Qt based GUI applications

Prior to , the Qt GUI module was the monolithic container for all things relating to graphical user interfaces in Qt, and included the Qt widget set, the item views, the graphics view framework and also printing. Starting Qt 5, these classes have been moved to the Qt Widgets module. Printing has been moved to the Qt Print Support module. Please note that these modules can be excluded from a Qt installation.

If you use qmake to build your projects, Qt Gui is included by default.

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

539 questions
5
votes
1 answer

How to get the text color of a QLabel?

I'm wondering how to get the text color of a specific QLabel. I'm setting text color earlier in my code an need to read it out again later to determine which action to take...
user3100895
  • 51
  • 1
  • 3
5
votes
2 answers

'class QWidget' has no member named 'setFrameStyle'

I'm trying to compile a program (found here: http://sourceforge.net/projects/lisem/) by following the instructions said by the author. However, when compiling it in Qt Creator, it gives the error: class QWidget has no member named setFrameStyle for…
Mark
  • 65
  • 2
  • 7
5
votes
1 answer

implementing pyqtgraph for live data graphing

I am trying to get a live plot of data as it is being collected by an instrument using pyqtgraph. The data collection is handled by the main process this is then passed over a connection to a subprocess that plots it. I am just trying to pass the…
EOF
  • 53
  • 1
  • 1
  • 6
5
votes
1 answer

Overriding QPaintEvents in PyQt

I'm trying to create a TextEdit widget that will have a delimiter line. As a start, I've created a MyTextEdit class (as a subclass of a QTextEdit) and overridden its paintEvent() method: import sys from PyQt4.QtGui import QApplication, QTextEdit,…
Dmitry Shachnev
  • 550
  • 6
  • 17
4
votes
2 answers

Alignment in a GridLayout in PyQt4

I'm trying to create a QGridLayout in PyQt4, and I can't figure out for the life of me how to change the alignment of the contents of the cells. The docs say that any nonzero value for the 5th (6th counting self) argument means that the element…
HunnyBear
  • 117
  • 1
  • 1
  • 10
4
votes
1 answer

Update image on a label PyQT5

I am new in python. I want to update an image on label1. But function 'def browse' always give me blank label instead. Seems the code does not get the image or it failed to update the label, and the program did not give any error message. Did i…
SimpleDish
  • 45
  • 1
  • 4
4
votes
2 answers

How to toggle a window from fullscreen to normal mode programmatically?

I am using this code to toggle a window from normal mode to fullscreen: void MainWindow::on_action_Fullscreen_triggered() { showFullScreen(); } How to return back to normal mode when I trigger this action again?
GeoMint
  • 169
  • 1
  • 13
4
votes
0 answers

Python: PyQt4 QtGui ImportError: DLL load failed

I have been trying to use PyQt4, but I can never use QtGui. I recieve the following error... from PyQt4 import QtGui ImportError: DLL load failed: The specified module could not be found. from the following code... import sys from PyQt4 import…
4
votes
1 answer

Have textbox update every 5 seconds PyQt

So here is my problem, I have data from a serial cable being read every 5 seconds and being stored on a CSV file. I am also taking that data and making it into a list. What I would like to do is take variables 5, 7, and 9 and have them be displayed…
NRav
  • 407
  • 1
  • 6
  • 18
4
votes
2 answers

parent() or super() to get a parent object?

I have two classes : The first one (the parent class) instantiates the child class in a method. I am trying to modify parent objects properties inside the child class. (These objects are PyQT QWidget s). Here is the begining of my Parent and Child…
Olivier Giniaux
  • 870
  • 2
  • 8
  • 22
4
votes
2 answers

How do I create a qt app in nim

I'm looking to use nim in an upcoming project, but I'm not sure where to start. I've worked on a fair few webapps over the last two years and I'm pretty good with python. I'm also very good with Linux. Now I want to make a GUI app for linux, maybe…
Ananth
  • 848
  • 11
  • 26
4
votes
1 answer

Why does cursor.clearselection() does not work in this example?

I am trying to create a button which underlines the selected text of my QTextEdit instance. In the constructor, I am activating the cursor and setting a bool variable for the setFontUnderline method used later. QTextCursor cursor1 =…
steve
  • 123
  • 1
  • 14
4
votes
1 answer

Add page to QStackedWidget at Design time Qt Designer

I currently need 3 pages in my QStackedWidget. However, in Qt Designer I am only allowed to add 2 pages. After I click the next arrow on QStackedWidget, it takes me back to the previous page instead of taking me to a new page. How can I add a new…
MistyD
  • 16,373
  • 40
  • 138
  • 240
4
votes
3 answers

Qt C++ connect QPushButton click

I have just started developing using QtGUI and I have checked out some tutorials and documentation, and by what I've read this should work. #define CONNECT QObject::connect void test(); QPushButton *lpTestBtn; int main(int argc, char *argv[]) { …
user2920222
  • 197
  • 1
  • 2
  • 8
4
votes
1 answer

On Qt how is it possible to set a 3 columns layout with 33% each?

i have a 3 columns layout and i'm struggling to find a solution in order to set 3 fluids columns on 33%.
Ben
  • 87
  • 1
  • 5