Questions tagged [qtwidgets]

Questions related to the QtWidgets module in Qt 5 that provides a set of UI elements to create classic desktop-style user interfaces.

The widget set of UI elements was put into its own module to keep Qt Gui modularized and less cluttered for GUI application using Qt Quick and so on.

The official documentation of this module can be found here.

Tagging recommendation:

You will often see questions tagged specifically as for QWidget, et cetera because the question is Qt 4 related even though it is about widget classes. From Qt 5 onwards, please try to use this tag for those cases. Make sure that you only tag questions with that contain questions about the core part of Qt Gui.

300 questions
0
votes
1 answer

how to display a textlabel as well as draw a circle on clicking a pushbutton "ADD"

I have read all related article of multiple slots with one signal but I am unable to display at the time of drawing a circle both trigerred by a push button "ADD". I can display the text label near the circle before clicking the button but i want it…
user12778200
0
votes
0 answers

"Command terminated" when using PyQt5 QtWidgets QGraphicsScene()

I am trying to open an image with PyQt5 QtWidgets QGraphicsView and using QGraphicsScene from the same module. When I am calling QtWidgets.QGraphicsScene.addPixmap(pix) the app closes with the output Command terminated. Below is the code: import os,…
0
votes
0 answers

QtGui & QtWidgets fail to find correct core on Mac OS X

I've seen similar questions asked before, but none of the solutions worked for me. Some of the tools I need for my work unfortunately have a QT dependency. I installed Qt using homebrew first. Setup paths and all that. I managed to build the tool,…
SpaceBear
  • 832
  • 3
  • 8
  • 22
0
votes
0 answers

Mouse click on tooltip showed in QSpinBox::validate causes a crash

I have a custom SpinBox class that extends a functionality of QSpinBox. I'm trying to show a tooltip when the input is correct, that is, show a tooltip in overriden QSpinBox::validate(QString &text, int &pos). But when I do the mouse click on the…
Mama Bullki
  • 128
  • 4
0
votes
0 answers

Getting Text from Qtreewidget

I have a QTreeWidget that has three columns. When the user clicks a QPushButton, what they've selected on a QListWidget is added the the QTreeWidget. I want to check if the value selected on the QListWidget is already present on the QTreeView. How'd…
Adrian
  • 13
  • 2
0
votes
1 answer

How to fix a bad resizing in qt label?

I am currently learning to use Qt. So I am trying to create an application that uses QtWidgets. However, when I ran my program and resize manually the window obtained, the texts displayed are trimmed (see image) . The code I am using is shown…
0
votes
2 answers

Find a QLabel by its name and use setText() function

I've done a lot of research, but could not find anyone with this specific problem so far. Very sorry if there is already a topic, but couldnt find it. What im trying to do is to find a QLabel in a QGridLayout, by importing a .txt file and reading…
Simon
  • 13
  • 1
  • 5
0
votes
1 answer

How to dock a QDockWidgets inside a QSplitter?

I am trying to have a QSplitter accept QDockWidgets in my application. So far, I have done everything through the Qt Designer and what I have done is create three individual QWidgets. I then select all three of the QWidgets and I right click on them…
Sailanarmo
  • 1,139
  • 15
  • 41
0
votes
1 answer

Selecting different QMainWindow at program startup but facing strange QMessageBox exec() behavior

I am working on a simple Qt Widget application where I have 2 different QMainWindow classes to show to user (at the moment only one is implemented). My idea is to show a message box with custom buttons to ask the user which mode of the program to be…
DEKKER
  • 877
  • 6
  • 19
0
votes
1 answer

Qt Creator version 4.9.2: Filter output in Application Output pane

Does anyone out there know of a Qt Creator plugin that will give me the ability to filter debug output (based on a string pattern) in Applicaiton Output pane during debugging. This is a common feature in logging applications, but in many cases it's…
santahopar
  • 2,933
  • 2
  • 29
  • 50
0
votes
1 answer

Show and hide\close windows with user arguments using PyQt5

I am writing GUI app with the help of Qt Designer. The app consists of multiple windows, so when the user clicks the push button on one window, the next window should open and the current window should hide. I achieved this feature for going from…
user8026974
0
votes
0 answers

How can I embed a QLabel inside a QML document?

I've found this example of how to display a QWidget (specifically a QLabel) inside a QML document: https://kunalmaemo.blogspot.com/2011/07/how-to-display-qwidget-into-qml.html The problem is that this uses QtQuick 1 and won't compile in my…
MusiGenesis
  • 74,184
  • 40
  • 190
  • 334
0
votes
2 answers

passing arguments to batch using qprocess

I'm trying to do a qt widgets application and I've got a batch file: containing @echo off echo Hello Everyone! echo ---------------- echo 1 - Exit Program echo ---------------- echo 2 - Say Hi 5 times echo ---------------- set /p QUESTION=What…
skdadle
  • 155
  • 1
  • 2
  • 17
0
votes
0 answers

Python: dynamically adding classes to QtWidgets.QMainWindow() instance?

I have many QtDesigner py files (version 5.11). I want to include the classes of the QtDesigner py files in a main class. Manually, I would do this for the first subclass, mainMenu.py menu = QtWidgets.QMainWindow() menu.Ui_mainMenu =…
0
votes
1 answer

QQuickView child of QtWidget window

I am trying to to create a QQuickView sub-window that is embedded inside of an existing QWidget window. The below code I have creates a new separate QQuickView window instead of a sub-window. main.cpp subWindow::subWindow(QWidget* parent) { …