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
0
votes
2 answers

How to insert a command line to GUI applications

I need to make a QT GUI application that will be able to run the command line batchs and commands. For example, ping, tcpdump, etc. ... I would imagine it like this: The standard graphical window with the QTableView, some checkboxes, etc. ... with…
exo
  • 373
  • 5
  • 22
0
votes
1 answer

How to return focus to the window?

After close MessageBox the focus self does not return to the window. I tried so: QMessageBox msgBox; msgBox.setText("Ok"); msgBox.exec(); this->setFocus(); How to return focus to the main window (this)? //dialog.h #ifndef DIALOG_H #define…
Adam Shakhabov
  • 1,194
  • 2
  • 14
  • 35
0
votes
1 answer

QProgressBar makes an application consume much memory

For days, maybe weeks, I have been looking for a memory leak in my application. I didn´t find where it can be until I found this: https://bugs.kde.org/show_bug.cgi?id=292217 After checking everything, I discover that QProgressBar takes too much…
0
votes
1 answer

Qt 5.1.1 touch precision is not accurate

Issue I am facing with Qt 5.1.1 applications is that, the touch precision on the widgets are not accurate and I need to touch a little bit above the actual widget area to trigger the event (clicked). In order to make the touch interface work, I am…
Bhush
  • 58
  • 10
0
votes
1 answer

QToolBar : Displaying the menu when toolbutton is pressed - DownArrow Issue

I currently have something like this in my code: QMenu *mabout = new QMenu("About"); QToolButton* tb_about = new QToolButton(); QAction *test= new…
MistyD
  • 16,373
  • 40
  • 138
  • 240
0
votes
2 answers

Qt 3 - adding a widget to an already existing widget and its layout

I have a QDialog created in designer with a QFrame testFrame which I've added a QHBoxLayout to, and at some point after the whole thing has been created and shown I am trying to programatically create a new widget with the QFrame as a parent.…
Rajveer
  • 847
  • 11
  • 28
0
votes
0 answers

QGraphicsObject boundingRect() and shape() rewrite

I have a class inherited from QGraphicsObject,and I have a private QPixmap variable car. All I want to do is draw this car image in the scene. I want to draw many cars like this. And I need to know whether two cars collides with each other. I…
Jackie
  • 385
  • 1
  • 3
  • 10
0
votes
1 answer

Qt: How to save an image in asset from url?

Is it possible to save an image from an url in the assets folder? void DataPacking::createAndSaveImage(QString argSavingFilePath, QByteArray argDataLoaded) { m_file = new QFile; m_file->setFileName(argSavingFilePath); …
oumaimadev
  • 69
  • 7
0
votes
2 answers

QModelIndex::data not working

I have a QTreeView in my application with a data model. I'm capturing when items are double clicked with the following slot: void MainWindow::on_treeView_doubleClicked(const QModelIndex &index) { if (index.parent().isValid()) { …
Brad
  • 10,015
  • 17
  • 54
  • 77
0
votes
1 answer

QComboBox::showPopup() with no animation

Is there a simple way to use QComboBox::showPopup() without the animation making it instant?
Jared Price
  • 5,217
  • 7
  • 44
  • 74
0
votes
2 answers

QScrollbar scroll to center

I would like to scroll my QScrollbar to center; I thought it was easy, but QScrollBar *bar = ui->scrollArea->horizontalScrollBar(); bar->setValue(bar->maximum()/2); bar->update(); ui->scrollArea->update(); doesn't do the job. What goes wrong?
Bug Fisher
  • 13
  • 3
0
votes
1 answer

Accessing QT GUI from CALLBACK

I am catching all mouse events happening in my program with a windows hook: #include #pragma comment(lib, "user32.lib") HHOOK hHook = NULL; using namespace std; LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam) { …
user754730
  • 1,341
  • 5
  • 31
  • 62
0
votes
0 answers

PyQt Window Focus on right-click

I have a very basic setup. A main dialog window made with: dialog = QtGui.QDialog() Then a couple commands to set it visible: dialog.setFocus(True) dialog.show() dialog.raise_() dialog.activateWindow() app.exec_() One of this dialog window…
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
0
votes
1 answer

How to close the qt widget ui on a button clicked in promoted widget?

I have a qt designer ui form, which has a qwidget at the bottom of the form. The qwidget has a promoted widget. The promoted widget has a number of labels and buttons. One of the buttons is a home button. On clicking this button the user needs to…
gfernandes
  • 1,156
  • 3
  • 12
  • 29
0
votes
1 answer

How to load a QtDesigner ui form into a QFrame of another ui form?

I have designed a QWidget based QtDesigner ui form. Lets call it Form1. I added few pushbuttons and labels in it. Now I designed another QWidget based qt ui designer form.Lets call it Form2. I have a QFrame in Form 2 in which I would like to load…
gfernandes
  • 1,156
  • 3
  • 12
  • 29