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

"QComboBox Pop-up" expanding and QtWebkit

In Firefox/Chrome/InternetExplorer/Safari/Opera pop-ups from the combobox expand as the content, see Firefox picture: QComboBox pop-up does not expand the content. Pop-ups are limited by the size of QComboBox, see QWebView picture: So I…
Protomen
  • 9,471
  • 9
  • 57
  • 124
9
votes
2 answers

How to get the mouse position on the screen in Qt?

I want to get the mouse coordinates on the screen. How can I do this in Qt? On Windows, using C# I was doing something like suggested in the answers to this question.
Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474
8
votes
3 answers

Qt : setData method in a QAbstractItemModel

I'm new to model view and I have been following this tutorial while checking the documentation at the same time and I stumbled upon this little detail : The code of the tutorial which can be downloaded here has in the QAbstractItemModel class (here…
Ilyes Ferchiou
  • 583
  • 3
  • 10
  • 22
8
votes
2 answers

Threaded OpenGL with shared QGLWidgets issue with Qt 5.1

I use two QGLWidgets. One for loading textures and one for rendering, but it is not working. I used the following explanation from http://blog.qt.digia.com/blog/2011/06/03/threaded-opengl-in-4-8/ Texture uploading thread Uploading many (or…
riv333
  • 389
  • 2
  • 12
7
votes
1 answer

Building a simple Qt UI Application using CMake creates blurry UI

I have created a simple Qt application with only a MainWindow and a Button. When I build it in Qt using Qmake it works fine and UI is good as well. On other hand if build it using CMake it works fine but application UI is blurry. Could anybody…
Anwar Shaikh
  • 1,591
  • 3
  • 22
  • 43
7
votes
2 answers

QOpenGLFunctions missing important OpenGL functions

QOpenGLFunctions seems to be missing important functions such as glInvalidateFramebuffer and glMapBuffer. From what I understand QOpenGLFunctions loads the intersection of both desktop OpenGL functions and ES functions. If that's the case, why…
Ben
  • 1,816
  • 1
  • 20
  • 29
7
votes
3 answers

QImage from HBITMAP

In my windows-only program, I use a third-party library, which returns a HBITMAP. Is there a way to initialize a QImage from its contents, i.e. to convert it to a QImage?
sashoalm
  • 75,001
  • 122
  • 434
  • 781
6
votes
2 answers

How can I allow user resize on elements within the window using Qt designer?

I want to allow a user using my application to be able to drag a boundary between two widgets in my window which will resize the two (i.e. you drag it down and the top one will get bigger while the bottom gets smaller, and vice-versa). Is there…
6
votes
1 answer

Qt How to change gridlayout column size

Suppose I have a gridlayout of three columns. I want each column to have custom width. Seems to me that the width of the columns are fixed automatically. How can I do this in the qt designer?
Yousuf Azad
  • 414
  • 1
  • 7
  • 17
6
votes
1 answer

PySide.QtGui RuntimeError: '__init__' method of object's base class not called ...but it was

Some environment basics Python Version: 3.4.2 OS: Windows 8.1 Searching so far, I suspect this other question is related to my issue at hand, but I'm not sure how I'm replicating enough of the same conditions--probably my lack of in-depth python…
LastTigerEyes
  • 647
  • 1
  • 9
  • 21
6
votes
1 answer

How to snap QWidget geometry when moving with mouse?

When dragging a widget with mouse the widet is freely moved (widget with frame). What I want to achieve is to have certain areas wher the moved widget is snaps for example to other widget or border of the screen. For example the playlist window in…
Uga Buga
  • 1,724
  • 3
  • 19
  • 38
6
votes
4 answers

Qt application with optional gui

I am going to write program using Qt for some image processing and I want it to be able to run in non-gui mode (daemon mode?). I'm inspired by VLC player, which is "typically" GUI program, where you can configure it using GUI, but you can also run…
d21d3q
  • 365
  • 2
  • 10
6
votes
1 answer

PyQt: How to hide QMainWindow

Clicking Dialog_01's button hides its window and opens Dialog_02. Clicking Dialog_02's button should close its windows and unhide Dialog_01. How to achieve it? import sys, os from PyQt4 import QtCore, QtGui class Dialog_02(QtGui.QMainWindow): …
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
6
votes
2 answers

QGraphicsItem move event - get absolute position

I have a QGraphicsEllipseItem that I want to be movable and triggering signals on moving. So I subclassed QGraphicsEllipseItem and QObject and overrode the itemChange method to trigger a signal. That all seems to work but the positions that are…
vlad_tepesch
  • 6,681
  • 1
  • 38
  • 80
6
votes
1 answer

Switching between multiple ui forms in Qt

I am developing the user interface for a embedded device. I have created about 30 ui forms. You have first the Welcome form which loads the database and connects automatically to the available known wifi and all those start up functions. Once…
gfernandes
  • 1,156
  • 3
  • 12
  • 29
1
2
3
35 36