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

Which Class has to be reimplemented for custom Selection in QTableWidget?

QTableWidget consists of several Selection Modi, which are selectable with the method setSelectionMode (QAbstractItemView::SelectionMode mode) None of the given modi fits the type of interactive selection i want to have. I want to implement a…
Stefan Lindblad
  • 410
  • 2
  • 17
3
votes
3 answers

Qt: Detect Double-Click with Modkey (Shift, CTRL, etc.)

How can I detect whether a double click on a QWidget (QStatusBar, in my case) occured while a modifier key was held down? I can overload void QWidget::mouseDoubleClickEvent ( QMouseEvent * event ) to get the double click, but how can I sure whether…
fawick
  • 590
  • 5
  • 20
3
votes
2 answers

How to import mainwindow (.ui file) using PySide

I'm doing a python project and design its interface using PySide. The problem is how can I import mainwindow (.ui file) from Qt Designer using PySide. My class is inherited from QtGui.QMainWindow. Thank you for your answer. ^^
Pandarian Ld
  • 727
  • 3
  • 13
  • 25
3
votes
2 answers

set subchild not to indent in qtreewidget when I expand them

I have a QTreeWidget and I want children of a QTreeWidgetItem not indent when I expand them. I want to set the line only for top items. The first screenshot demonstrates what I would like to have, and the second what I am currently having. Would you…
mari
  • 417
  • 1
  • 6
  • 21
3
votes
3 answers

Qt tab order keys

A user can step through the widgets of QtGUI via key "Tab" or via arrow keys "<-" and "->". Does anybody know how to disable the arrow keys for this purpose? I need the arrow keys for something else.
MichaelXanadu
  • 505
  • 1
  • 10
  • 25
3
votes
1 answer

Qt: Hide folders in getSaveFileName

I would like to save a file using QFileDialog::getSaveFileName without allowing to choose the path or at least hide folders. Reading the doc I tried to set QFileDialog::ShowDirsOnly as an option like this: QString fileName =…
Jeanstackamort
  • 309
  • 2
  • 4
  • 16
3
votes
1 answer

PyQt: How to stick a widget to the bottom edge of dialog

Running this code creates a simple dialog with a label, lineedit and two buttons. All the widgets beautifully respond to the dialog horizontal resizing. But the buttons at the bottom of the dialog do not stick to the lower edge of dialog window…
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
3
votes
3 answers

qt - what's the purpose of initialising child widgets in parent window/widget class?

In the VideoWidget and the Secure Socket Client examples in Qt, the code presented there initalises the child widgets in the parent widgets, like so: SslClient::SslClient(QWidget *parent) : QWidget(parent), socket(0), padLock(0),…
Skaty
  • 467
  • 2
  • 6
  • 19
3
votes
1 answer

Does Qt have a balloon widget (popup pointing to its parent)?

Sorry for the lame question and for not really knowing the name of the widget depicted bellow. I looked around in the Qt examples and couldn't find anything similar. Any hints on how to implement this or knowledge of someone that released this kind…
dudu
  • 675
  • 6
  • 15
3
votes
2 answers

Qt auto generated form provides wrong path to source code files

I have added qcustomplot.h/.c files to my Qt project. They are located in: "QT_PROJECT_DIR/QCustomPlot/". Every time I use the designer in Qt Creator and build I get this error in ui_mainwindow.h: error: ../../qcustomplot.h: No such file or…
uniquenamehere
  • 1,869
  • 3
  • 31
  • 60
3
votes
1 answer

KDE writing (too many) in the console

I'm developping a Qt GUI application. My problem is that I use the console for another thread (it write his comunication in it), and the main problem is that when I create a QFileDialog (in order to select a script file), KDE is wrinting useless …
MokaT
  • 1,416
  • 16
  • 37
3
votes
1 answer

Navigating through keyboard in QStackedWidget Item

I am trying to navigate QStackedWidget Item by using KeyPressEvent. But am not able to do it. What Signal function we should use for keyPressEvent? My Code: mywindow::mywindow() : QMainWindow() { stack = new QStackedWidget(); list1 =…
Suresh
  • 745
  • 4
  • 11
  • 25
3
votes
1 answer

QListWidget, insert linebreak for longer text

I want to use QListWidget to display my content. But some of the content is quite long and I want to make the text continue on a second row instead of showing a horizontal scrollbar. I use Qt Creator and I can't seem to find any options in the…
Jedi Schmedi
  • 746
  • 10
  • 36
3
votes
2 answers

navigate between widgets using arrows in QT

I'm working on UI using QT. The ui is simple, it's app based like IPhone or Android. Say there are 9 items (3 rows x 3 cols). What I want to do is to navigate between widgets using arrow keys. If the focus is in [row 1,col 1] and I press down…
BobAlmond
  • 459
  • 5
  • 12
3
votes
3 answers

how to draw a line between items of a QCompleter as a separator?

I have a QCompleter and a QStringListModel that is set to QCompleter. Now how can I draw a line as separator between items of StringList that is set to QStringListModel. Finally, QCompleter will be set to a QLineEdit.