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
3
votes
1 answer

Spacing between widgets in QHBoxLayout

I'm trying to create a GUI with QtCreator. For this GUI, I need to display several images with different sizes next to each other. These images should be touching each other. I use a QWidget with a QHBoxLayout, where I add the labels (with different…
Tcanarchy
  • 760
  • 1
  • 8
  • 20
3
votes
1 answer

New Line Character and PyQt

Using QtGui.QMessageBox to display the messages, warnings and errors. It seems that QMessageBox doesn't want to work with "\n" new line character when used with html tags message = " GOOGLE This a line number…
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
3
votes
2 answers

QtGui lables and frames have different sizes on different machines

Opening the same QtGui on a different windows system results in different displaying of the label size or frame size that makes thing ugly .I have compiled my pyqt4 application with cx_freeze to .exe file and when I open my application in another…
alizx
  • 1,148
  • 2
  • 15
  • 27
3
votes
1 answer

QTableWidget Force Single Item Selection

In PyQt how can I force a QTableWidget to only accept a single section (so that you can't select more items with Shift or crtl)?
user2339945
  • 623
  • 1
  • 9
  • 14
3
votes
2 answers

What's painter.setViewport exactly do?

I know how painter.setWindow works. for example, if I maximize the widget larger, whatever I drew in that widget gets larger also in the same ratio. but I can't understand what painter.setViewport exactly do. Can anyone explain to me how it works…
Tito Tito
  • 248
  • 3
  • 10
3
votes
1 answer

Highlight odd lines with QSyntaxHighlighter

As far as I know, I have to inherit from QSyntaxHighlighter and and override highlightBlock() to make a highlighter for my QTextEdit. However, I can only get a QString in highlightBlock(). The string does not contain any information about where it…
3
votes
1 answer

QTableView and double click on a cell

I am working on a test case editor. This editor contains USART a transmit and receive packet format. The editor is a table view. The transmit and receive packet is eight bytes long, for example: 0x01 0x02 0x03 ... 0x08 It is in my fifth and sixth…
Katoch
  • 2,709
  • 9
  • 51
  • 84
3
votes
1 answer

How to sort with beginMoveRows without persistent index corruption / duplication?

I'm trying to use beginMoveRows / endMoveRows to make persistent indexes stick, but sometimes expanded state flags / persistent indexes are duplicated, where they should not be. There is quite a lot of code, so I'll go through what I think I have…
0xbaadf00d
  • 2,535
  • 2
  • 24
  • 46
3
votes
1 answer

QListView with checkboxes for viewing of filesystem

It is necessary to list of directories by given path in QListView whith icons and checkboxes, then transmit names of marked folders to the program. For list directories i use code: #include #include #include…
2
votes
1 answer

Unwanted padding when using QWidgets and QGroupBox in QT

I'm having a huge problem with unwanted padding on one of my Widgets. This is how its set up: First I have a MainWindow which has a QGridLayout with margin, padding and contentsMargins all set to 0. In that I put a QGroupBox on position 0,0 and on…
chikuba
  • 4,229
  • 6
  • 43
  • 75
2
votes
0 answers

PyQtgraph - Plotting real-time data - Add "line labels" next to graph which move up and down in concert with real-time data (see illustration in post)

I'm plotting 2 lines on a pyqtgraph in real-time (simultaneously), and I'd like to add line labels on the right of the graph, that move up and down with the incoming real-time data, as if 'attached' to the end of the plotted line. It's a bit…
2
votes
1 answer

RuntimeError while ploting data from loop using pygtgr

I need to plot data generated in a loop using pyqtgraph, but every time I get the following error: RuntimeError: wrapped C/C++ object of type PlotDataItem has been deleted This is a minimal example that generates this error. Basically, I want to…
james
  • 195
  • 1
  • 1
  • 9
2
votes
2 answers

Intersection of QPolygons' edges / Getting all the points on Qpolygon's Edge

I have two closed QPolygonFs and I need to find out whether their edges (that is their contours) intersect. As these polygons may be included in one another, looking simply at the intersection of the polygons does not work. PyQt5 has a built-in…
2
votes
2 answers

Terminate PyQt Application

If the user interacts with the application, for example pressing a button, and the user clicks then on the X button, the application keeps running, but the window closes. How can I fully terminate the application. It’s built using PyQt5.
yannh
  • 392
  • 5
  • 14
2
votes
2 answers

Could I develop GUI software with Python QT within Ubuntu WSL?

I'm working on Windows 10 most of the time. I want to learn something new and I've decided to build an GUI software with Python QT. Since I do have Ubuntu installed as a subsystem, could I use it to actually run the software that I'll be building? I…
yierstem
  • 1,933
  • 5
  • 21
  • 42