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
4
votes
3 answers

How to control the position of QDialog?

Is there any easy way to open the Qt dialogs in the same position as they were the last time the application was open ? i.e. preserve position of dialogs between application sessions ? By easy way I mean not to have manually write the window…
user152508
  • 3,053
  • 8
  • 38
  • 58
4
votes
1 answer

Qt 4.8 - QFileIconProvider, Getting icon for non-existent file (based on extension)

I'm currently trying to get the icon based on a file extension, but it seems like QFileIconProvider will only return an icon if it can actually read an existing file. Is there any way I can get a QIcon based off of a file extension? One alternative…
Brad
  • 10,015
  • 17
  • 54
  • 77
3
votes
3 answers

How to know the file's type to save, using QFileDialog

About pyQt4 I prefer to use the static method for the getSaveFilename in the QFileDialog so that the user sees the Windows/Mac native dialog. My problem is that if the user doesn't type the file extension the in the save file name (say when…
JonatasTeixeira
  • 1,474
  • 1
  • 18
  • 24
3
votes
1 answer

PyQtGraph: Issue looping through plotting slices of data

I have a python class that generates a numpy array of size 10000 and performs some calculation on it. The class has two plot methods and both use pyqtgraph Plotting the entire data Plotting segments of data one at a time (200 samples) I was…
afp_2008
  • 1,940
  • 1
  • 19
  • 46
3
votes
0 answers

PySide2 signal instances and emit function as regular python function arguments

I have a PySide2 application that runs mostly well. However, from time to time, it exits itself without any error (stdout, stderr are empty, even when run from terminal - tried everything) while a worker thread sends updates to the GUI thread via…
3
votes
1 answer

How to create a multi window Qt application

I have a mainwindow application created from qt widget. Now I want to add a child window to this mainwindow so that I can switch the main window and child window continously
VamsiKrishna Neelam
  • 103
  • 1
  • 1
  • 11
3
votes
1 answer

QWizardPages to keep their own minimum sizes

I'm working with Qt (version 4.6 on Windows XP 32-bit and compiling in Qt Creator 2.0.0) and trying to get a QWizard to work out. First Problem: I have three QWizardPages in my QWizard so far. Each page has a QVBoxLayout applied as it's layout. My…
Joel Verhagen
  • 5,110
  • 4
  • 38
  • 47
3
votes
1 answer

Pan & Zoom all QWidget children

I would like to have a QWidget which has the possiblity to pan and zoom inside it. Scenario : When the user uses his mouse middle button to scroll-up/down, all children are scaled from the center of the widget. If the user holds Alt pressed, and…
jbltx
  • 1,255
  • 2
  • 19
  • 34
3
votes
3 answers

How to display text in main window?

I'm new to Qt and I'm having a hard time finding a simple example illustrating how to display some text on the main window. For example, I just want to save some text in a string and display the contents on the main window. I thought to do something…
the_prole
  • 8,275
  • 16
  • 78
  • 163
3
votes
2 answers

QComboBox drop-down item margin

I want to style my QComboBox with margin for the drop down items. This is how it looks like now: And I would like something like this: I tried with QComboBox QAbstractItemView::item { margin: 3px; } but it doesn't work. Can you help me with…
Jacob Krieg
  • 2,834
  • 15
  • 68
  • 140
3
votes
1 answer

Properly removing items from QGraphicsScene/QgraphicsItemGroup/QGraphicsView

I'm trying to make a plot with movable control points usig QGraphicsView, QGraphicsScene && QGraphicsItemGroup. The problem I've encountered is I can't find any method of removing/deleting the item. My thoughts are following: I'm going to have a…
mishan
  • 1,177
  • 3
  • 19
  • 42
3
votes
1 answer

Qt - Can't access dynamically created QHBoxLayout widgets

On button press, I am creating a QHBoxLayout and adding three widgets to it (combobox and two spinboxes). I then add the created QHBoxLayout to a vertical layout already defined in Qt Design view. In another method, I want to access each of these…
mumush
  • 650
  • 6
  • 14
3
votes
1 answer

Embedding IE window inside a QFrame

I'm trying to embed an IE window into a QFrame using QProcess to call the IE application. I'm working on Win7 32bit using Qt 5.2.1. I have tried the following approaches Try to set the parent of the process to be the frame, instead of the…
user3079474
  • 1,653
  • 2
  • 24
  • 37
3
votes
1 answer

Convert eigen vector to QString for display

What is the easiest way to print a vector from the Eigen library in a Qt interface? Is there an easy way to convert the vector to a QString so that I can use setText()? Or is there an easier way of doing it?
user3482499
  • 123
  • 1
  • 8
3
votes
1 answer

Run function when push button is clicked

I am using the Qt add in for visual studio. Now I made a simple push button using Qt designer, and I want to use that push button so that it runs a function with a certain inputparameter when it is pressed, and then displays the result that is…
dreamer
  • 1,192
  • 5
  • 20
  • 42