Skip to content

Tag: pyqt5

Best way of getting Qt pushbuttons Icons information in python?

Im developing a PyQt application which modifies buttons icons dynamically. The icons are created with QStyle, stored as class parameters and then put into the buttons with the setIcon() method. Since the icons are modified dynamically, i want an elegant way of checking what is the current button icon. The ori…

Pyinstaller Error when try to create exe file

When i try to create the executable for my program using pyinstaller –onefile gui.py it gives me this error. pyqt5 and all the required packages are installed for the program but when i tried to create the executable it gives me this error what is wrong with the process Answer Finally i found a solution…

Is there a proper way to hatch QLabel

As stated in the title, I do want to know if there is a proper way to hatch the QLabel which in my case is has the Geometry of QRect as you can see in my code. I checked the documentation but I didn’t understand how I can hatch the QLabel. Here is an image of how it might the

How to keep QWidgets in QTreeWidget hidden during resize?

I have a simple UI with QWidgets within a QTreeWidget. Some of them need to be hidden. Every time the application is resized, all QWidgets become visible. Below is a minimal example to demonstrate the issue. How can I make sure the QWidgets stay hidden until setVisible(True) is called explicitly? pyqt version…