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
1
vote
1 answer

How to dynamically resize a Matplotlib figure when embedded in a custom QtWidget with QtDesigner and PySide6?

I am facing the following issue: I have constructed my project as follow: ¬project ¬ uis (contains all guis and widgets) ¬ python scripts I have designed a GUI with QtDesigner and used a QWidget to embed a matplolib pyplot. I…
sylvanoMTL
  • 21
  • 3
1
vote
1 answer

Passing cookies to QWebEngineView

so I have a python code which converts url to pdf like below import sys from PyQt5 import QtWidgets, QtWebEngineWidgets from PyQt5.QtCore import QUrl, QTimer from PyQt5.QtGui import QPageLayout, QPageSize from PyQt5.QtWidgets import…
AMendis
  • 1,346
  • 4
  • 18
  • 34
1
vote
0 answers

Birds eye view - QT3D - Camera

Is possible to change the camera view in QT3D from frog view to birds-eye view? Am trying to set the camera to a "top down" view and "collapse" the z-coordinate. Edit: I am working on a project that is going to visualize stars in a solar system, and…
1
vote
0 answers

What's the difference between polish()/unpolish() and update()?

I did research on all of them. I saw that docs use just unpolish() and polish(), but stackoverflows answers use them with update(). I tried and polish() without unpolish() and update() and it works. So what's the diffrence? Using only polish() is…
nebo
  • 19
  • 1
1
vote
0 answers

vtkplotlib set opacity/transparency in QtFigure

i want to use the vtkplotlib library to display different 3d models and i want to set the opacity in the background of the widget to 0. I just know how to set the normal background color with the method: ModelViewer.background_color =…
marxcell
  • 69
  • 6
1
vote
1 answer

how to get toggle value in pyqt5?

I found the following tutorial https://www.pythonguis.com/widgets/pyqt-toggle-widget/ and was able to create a Toggle widget, but I don't know how to detect the value changes. Can you please tell me how to detect toggle value change in below…
hashy
  • 175
  • 10
1
vote
0 answers

QFileDialog::getOpenFileName returns the full path not the file name

I'm creating a text editor using QT Widgets, with tabs like VS Code, and when I open a file with QFileDialog I want to rename the tab title to the name of the file just like normal text editor do, I've found the QFileDialog::getOpenFileName() but…
Fady's Cube
  • 158
  • 1
  • 7
1
vote
2 answers

Embed separate video streams in Qt widgets on embedded-linux using Gstreamer

I'm looking for any hints I can get on this problem : I have an i.MX6 device running an embedded-linux buildroot OS, and a Qt5 Widget-based app that runs on that screen. I also have a custom SDK, that I can't change and is limited to Qt 5.5.1…
lorker
  • 11
  • 4
1
vote
1 answer

How to use conditional transitions in Qt SCXML statecharts

I'm currently trying to understand Qts scxml state charts, and how to properly integrate them in my applications. One problem I stumbled uppon are conditional transitions. To explain how I use conditions here and what goes wrong, I made a minimum…
RobinW
  • 292
  • 4
  • 16
1
vote
1 answer

progress bar delegate fills vertically instead of horizontally

I'm trying to paint a column in a QTreeWidget using a QStylesItemDelegate with a custom paint method, to give the appearance of a progress bar. However, the progress bar is filling up from bottom to top, see attached screenshot (and also, the text…
marc
  • 264
  • 1
  • 2
  • 17
1
vote
3 answers

How can I add a pane to nuke and use it inside the GUI?

I am trying to create a nuke pane that I can call the same way the embedded panes are called. So far, I am able to see it in the 'custom windows' menu, but when I press on the button, the panel shows up empty. I know the code is working because…
Michiko
  • 31
  • 6
1
vote
1 answer

How to control the checkbox using the Python itself, and not by a mouse click?

I created a checkbox using PyQT, which normally works using mouse clicks. I want to know if there is a way with which I can uncheck and check the checkbox using the program itself, and not a mouse click. Basically I want to check and uncheck the box…
Jayant
  • 15
  • 4
1
vote
1 answer

How to call changeValue of QSpinBox only when user changed value

This is my QSpinBox slot method: void MainWindow::on_sbObjectSize_valueChanged(int arg1) { /*do something*/; } I need to distinguish when this value was changed by user (by typing value or click on arrows) and when it was changed from the code…
rainbow
  • 1,161
  • 3
  • 14
  • 29
1
vote
1 answer

How to access the raw widget pixels rendered on the screen?

I am trying to extract the pixel data from every frame, but when I try to get the pixmap it returns null. I thought that the pixmap would return the actual pixel data of what was on the screen, similar to glReadPixels but I think I am mistaken. I…
joethemow
  • 1,641
  • 4
  • 24
  • 39
1
vote
2 answers

Is it necessary to reload the whole window when refreshing a widget in a window in PyQt5?

I created a PyQt5 window where the data of an SQL table is shown in a frame (QtSql.QSqlTableModel, QTableView) and a Button to insert new data (InsertButton). In Order to refresh the shown table, I used…
py-unicorn
  • 69
  • 8