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

Library requires QApplication. How to use QApplication in Qt Quick project?

I have a Qt Quick project and I just added some source files. When trying to build I get the error message: QWidget: Cannot create a QWidget without QApplication Since I have a Qt Quick project I use the QGuiApplication. QApplication is a subclass…
uniquenamehere
  • 1,869
  • 3
  • 31
  • 60
6
votes
3 answers

Get objectname (as seen from Qt Designer) from QWidget?

I want to disable all but a selected set of widgets in my Qt application. What I am trying to do is to iterate all children of mainWindow using findChildren and disable all the resulting widgets except 'myTable' using setEnabled(false).…
fortytwo
  • 491
  • 1
  • 5
  • 16
6
votes
2 answers

Is there any way to save the order of columns?

I currently have a tableview attached to a class that is derived from QSortFilterProxyModel. Now I wanted to know if there is any way by which I can store the order of columns since the users tend to move the columns back and forth. Also is there…
Rajeshwar
  • 11,179
  • 26
  • 86
  • 158
6
votes
2 answers

how to merge two images into one using QImage and QPainter in qt?

Hi I am developing a blackberry10 app. Inside the app I have two images and I just need to merge these two images into a single image. There is no function in Cascades to combine them. When I posted this in the blackberry developer forum I was…
user2100249
  • 61
  • 1
  • 1
  • 2
6
votes
2 answers

PyQt4 cannot import QtGui but can import QtCore

I installed python3.3 x86 (official python.org installer) on this windows 7 32-bit then installed PyQt4-4.10 for python3.3 windows x86 from here PyQt4-4.10-gpl-Py3.3-Qt5.0.1-x32-2.exe, an official installer too, a full PyQt4 installation (including…
bahaelaila7
  • 83
  • 1
  • 6
6
votes
1 answer

Why is Qt QColor a part of QtGUI - possible workarounds?

I'm building a commandline version of an an application that utilizes QColor for cross-platform handling of color data. For some reason, this datatype is a part of QtGUI even thou it doesn't have anything to do with Widgets - any way to get this…
qdot
  • 6,195
  • 5
  • 44
  • 95
6
votes
2 answers

Qt Widget temporarily fullscreen

Consider a QWidget, normally a child in some Layout. Supposed I want to make it fullScreen for a while, then have it return to it's old spot. QWidget::setFullScreen() requires that the widget needs to be an independent window - any ideas how to…
qdot
  • 6,195
  • 5
  • 44
  • 95
5
votes
1 answer

PyQt4 filename dialog

I am a bit of a novice so be kind ;-) I had a GUI that I made using PyQt4 and python 2.6 with a working file dialog, (ie you clicked a button and a window popped up and allowed you to pick a file to load/save). The code for the GUI is like 2000…
Ben
  • 5,525
  • 8
  • 42
  • 66
5
votes
0 answers

How to deal with classes implemented in both Cv2/.dylibs/QTGui and LibQcocoa/ LibQt5Print Support?

I am trying to implement Mask RCNN on a dataset of images and my code halts with error messages. These 8 Classes are implemented in two different locations on my computer and the computer is telling me to pick one; however, I cannot understand how…
Sam
  • 51
  • 3
5
votes
2 answers

Using PyQtGraph my Surface Plot displays in the bottom left quarter of the window.

Here is my code. from pyqtgraph.Qt import QtGui import numpy as np import pyqtgraph.opengl as gl from netCDF4 import Dataset import sys def main(): app = QtGui.QApplication(sys.argv) w=gl.GLViewWidget() w.show() …
jcarilli
  • 71
  • 4
5
votes
1 answer

Items in a QListWidget turn invisible after reordering

I have a QListWidget which is populated by custom widgets with the use of setItemWidget. These custom list items are completely static, they just have a bunch of labels with various texts and images. My QListWidget is displayed correctly. I allow…
vsz
  • 4,811
  • 7
  • 41
  • 78
5
votes
2 answers

How to change window title and central widget in Qt?

Hi, I have a problem with changing window title and central widget in Qt. There is MainWindow: class MainWindow : public QMainWindow { // (...) QStackedWidget* widgets; Quiz* widget1, *widget2; } and there is a class Quiz: class Quiz :…
trivelt
  • 1,913
  • 3
  • 22
  • 44
5
votes
1 answer

Switching between one QToolButton to another in QT

I want to switch from one QToolButton to another in QToolBar. I have used QStackedWidget, their it is too simple to move from one widget to other but here I am not able to get how to move via using keyReleaseEvent. mywindow::mywindow() :…
Suresh
  • 745
  • 4
  • 11
  • 25
5
votes
2 answers

Qt debian/ubuntu: Can't compile, error: cannot find -lGL

I have a problem building applications in Qt on Debian. When I try to compile anything I get: /usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit status make: *** [test] Error 1 14:38:52: Proces "/usr/bin/make" zakończył się kodem…
Michał Zubrzycki
  • 845
  • 3
  • 11
  • 20
5
votes
3 answers

How to hide grid and show only zeroline in QCustomPlot?

Is there any way of showing zeroline in QCustomPlot while hiding grid? I have tried hiding grid with following line: ui->customPlot->xAxis->grid()->setVisible(false); ui->customPlot->yAxis->grid()->setVisible(false); But this also hides the…
Adnan
  • 2,986
  • 7
  • 43
  • 63
1 2
3
35 36