Category "pyqt"

The icon of QPushButton is blurry when DPI scaling is enabled

I found the icon of QPushButon is blurry when DPI scaling is enabled. Even if replaced by SVG, the icon is still blurred. Is there any way to make the icon clea

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

PyQt QtreeView scrollbar overlapping header

I've been trying to use QTreeView (instead of QListView) because I needed an horizontal header. Furthermore, I wanted to use stylesheet to customize header colo

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

Checkbox selection in QListView

I developed a simple dialog with a checkbox, which allows the user to select one or several items from a list. Besides the standard OK and Cancel buttons, it ad

Python PyQT5 WebEngine Segmentation fault Error

I wanted to create an app to download ms store app, it ran fine untill today now when i try to open the site (https://apps.microsoft.com/) pyqt5 window crashes

How to click on QMessageBox with pytest-qt?

I am creating some unit tests for a PyQt application with pytest-qt. And I would like to create open the graphical window, do some tests then close the window,

How to change QComboBox QAbstractItemView border radius in Qt Style sheet

I want the QCombobox to have a round shape similar to the picture above. I made it somewhat similar. But when I click the QComboBox to check the list, the ro

Adding a Image Button Class

I have a PyQT layout built with QWidget. I have a few labels, buttons, etc and now I want to add a image that changes color on click. For this, I have built a c

PyQt GUI size on high resolution screens

I posted a question a while ago asking about Tkinter backends and subsequently forgot about it but I've since realised that I'm using the pyqt backend. Is there

Add/Remove numerous plots on a PlotWidget in Pyqtgraph

I have a plotWidget (self.widget0) from pyqtgraph on the pyqt GUI. I want to add 200 plots at this widget. What I can do is add each plot one by one: self.plot0

pyqt5 : don't show empty folders after filtering files with a setNameFilters

Using a QTreeView and a QListView, I want to show only usable files for a certain software. the QTreeview shows folders only and QListView show the files in fol

Show string values on x-axis in pyqtgraph

I want to display string values for ticks on x-axis in pyqtgraph. Right now I am unable to figure out how to do that. Ex: x = ['a', 'b', 'c', 'd', 'e', 'f'] y

Sort dictionary of dictionaries by value

I have this dictionary: statuses = { 'pending' : {'status_for':'all', 'position':1}, 'cancelled' : {'status_for':'all','position':2},

How to add a arrow head to my line in pyqt4?

I got this code: from PyQt4 import QtGui, QtCore class MyFrame(QtGui.QGraphicsView): def __init__( self, parent = None ): super(MyFrame, self).__i

Unable to render webpage using QWebEngineView

I've been trying to render a webpage onto a widget in PyQt5. These are my settings PyQt : 5.15.4 | PyQtWebEngine : 5.15.4 | PyQt5-tools 5.15.4.2 I'm trying to r

Quick and easy: trayicon with python?

I'd just need a quick example on how to easily put an icon with python on my systray. This means: I run the program, no window shows up, just a tray icon (I've

PySide - PyQt : How to make set QTableWidget column width as proportion of the available space?

I'm developing a computer application with PySide and I'm using the QTableWidget. Let's say my table has 3 columns, but the data they contain is very different,

Clear all widgets in a layout in pyqt

Is there a way to clear (delete) all the widgets in a layout? self.plot_layout = QtGui.QGridLayout() self.plot_layout.setGeometry(QtCore.QRect(200,200,200,200)