Category "pyqt5"

PyQt5: How to Get Dimensions of Displayed Widgets

I have PyQt5 QLabels that expand/contract as the QMainWindow size changes. I want to get the dimensions of the QLabels when the QMainWindow is sized to anythin

PyQt5 using custom QDockWidget from Designer ui file

I'm trying to build an app with extensive use of QDockwidgets. However, I've found that I cannot use QDockwidgets made in Qt Designer. Here's my customized dock

How to use QTest.keySequence?

I'm trying to test if a shortcut is working using PyQt5 and QTest. Here is my code: Main.py from PyQt5.QtGui import QKeySequence from PyQt5.QtWidgets import QWi

Why won't my new layout be displayed dynamically on my GUI ? Python - PyQt

I'm trying to print some text in a new layout when a button is pressed. Unfortunately if won't work and I can't find the problem to solve it. Thank you for your

I wonder why pyqtSignal() is used. (pyqt, QThread, signal, slot)

This is the test code about QThread and Signal. from PyQt5.QtWidgets import * from PyQt5.QtCore import * import time import sys class Thread1(QThread): se

PyQt5 set multiple MIME Types in Clipboard

I have been trying to create an HTML-Like table using PyQt5 in terms of copying functionality. However, I am stuck at the following issue: when copying data fro

Why won't my QFileSystemView start at the 'set' location?

I have a QDialog that is passed a starting folder, which I expected to be the folder that would be selected and the upper level folders expanded. Everything wor

Adding drag and drop to a scroll area

I'm trying to create a scroll area that will allow drag and drop in QtPy5. I want to be able to drag one label (label 1) to another label (Label 3) and have the

close QDialog and back to the first QDialog

I just started learning Python and PyQt5, and I have this problem, I create two QDialog, the first one have a button to open the second, and in the second I hav

PyQT5 - Webview load URL - Unbalanced save/restore

I try to load a page in a webview widget. I got information: QPainter::restore: Unbalanced save/restore QPainter::end: Painter ended with 2 saved states so Web

PyQT5 problem with reading from port with QtSerialPort

I am currently trying to communicate with a device which sends a data stream by COM. I am having a weird problem with QtSerialPort which I currently don't know

PyQt5 A QA about menubar visibility by mouseover

Im using PyQT5 and Python Version is 3.78. I got a request than when I mouse over the button and display menubar.I made that code and it works. import sys from

Pyqt5-tools installation error on Widows 11

Downloading when I downloaded Pyqt5. But when I try to download Pyqt5-Tools, I'm getting an error. I using Windows 11 When using Windows 10, it was easily downl

How can I switch pages inside QStackedWidget every 15s without clicking any buttons using python

I made a Layout in QT Designer, I have a QStackedWidget with 2 pages and I would like to know how I can move from page inside the QStackedWidget every 15s witho

How to add functionality to widgets (PyQt5 ) in separate .py

I'm struggling to understand the general structure of how to work with PyQt. I want to have my main file class MainWindow(qtw.QMainWindow): def __init__(self, *

Highlighting Multiple lines on QTextEdit document

Attempting to create a way (using PyQt5 and Python 3) to highlight a multiple line number in the document of the QTextEdit widget. Here is the attempted code be

Pyqt5 Start-Stop Button

I want to make a simple start/stop button. But I couldn't get the stop button to work. Can you help me with this? def pressed(self): self.infoL

PyQt5: how to reimplement close-event in event-filter

I have this Qt Designer made main-window: main.py: from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow):

Python PyQt update GUI

basically I am having trouble with Updating my new GUI. Windows 10 | Python 3.8 | PyQt5 I got a class like class My_GUI(): def __init__(self): ..

symbol lookup error after updating Qt package

I recently updated all Qt packages from Pacman(Arch Linux). After updating I am getting system lookup errors after executing any python code. python: symbol