Category "pyqt5"

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

pyqt5 - update a dynamically created widget with its corresponding data

I have created a tool with help of a custom widget. This widget fits into the main window like so. User can create new instances of custom widget with a click

QDialog with QScrollArea adjustSize on widget hide

File: search.py # -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/chris/Documents/papinhio-player/ui/menu-3/radio-stations/se

PyQt5 QTimer in not working after moving it to a thread

I am currently trying to separate my PyQT5-GUI from my serial communication to prevent a freezing GUI. Therefore, I tried to implement threading. So when I am p

Import pyqt file: ValueError: source code string cannot contain null bytes

I've generated (pyuic5) ui_mainwindow.py file from .ui file made in Qt Designer: from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): d

Why QGraphicsGridLayout doesn't handle row and column placement of items placed on a scene?

So far, I have the following code: p1 = QGraphicsWidget(self.scene.addItem(QGraphicsPixmapItem(self.pixmap))) p2 = QGraphicsWidget(self.scene.addItem(QGraphic

PyQt - Oriented Flow Layout

I'm trying to adapt this PyQt implementation of FlowLayout to allow vertical flow as well as horizontal. This is my current implementation: from PyQt5.QtWidget

AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel' for PyQt5 5.15.0

A program I am trying to install requires the installation of PyQt5 5.15.0 , which gives me this error. The odd thing is that the installation works fine for th

Implementing copy and move when dropping an Item in `QTreeView`

I revised the whole question because the behavior I want is hard to implement and actually use. I'm trying to imitate the behavior in the File Explorer where wh

Rounded corners not shown for QPushButton in Qt Designer

I want to the corners to be rounded and hover for a QPushButton in Qt designer. Changing the style sheet has no effect. What am doing wrong? QPushButton#pus

I get "Release of profile requested but WebEnginePage still not deleted. Expect troubles !" even after calling app.exec()

I have a python code like below import sys from PyQt5 import QtWidgets, QtWebEngineWidgets from PyQt5.QtNetwork import QNetworkCookie from PyQt5.QtCore import Q

pyqt5 draggable rectangles on picture

I am very new to pyqt5 and trying to figure out how to replicate the following idea. Load an image. Draw MOVEABLE rectangle(s) on top. -- by Moveable, I mean r

How might one make a PyQt window which is avoided by other windows, like how windows avoid going on top of or below a panel?

I'd like to make a very simple PyQt5 panel, something a little like a very simple version of the MATE panel. In order for it to work as a panel, other windows o

PyQt5: How to set SameSite/Secure headers in QNetworkCookie

I have some Python code which sets a cookie like this: loader = QtWebEngineWidgets.QWebEngineView() profile = QtWebEngineWidgets.QWebEngineProfile("storage", lo

Get the text and index of the current selected QTreeView item

I was wondering how I can return the text value, and index of a selected item in a QTreeView. I tried using: self.TreeView.selectedIndexes() but that returns

'pyuic5' is not recognized as an internal or external command

I am trying to convert ui file created by QTDesigner to py file. but i get the error: pyuic5 is not recognized as an internal or external command. I use anacond