Skip to content
Advertisement

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 original Qt documentation mentions the setIcon() method but i couldnt

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 to fix the error. it

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 start a QApplication from shell without blocking it?

I have a simple Qt5 Application which can be installed as a pip package. The package has an entry point so i can start the application via a command prompt. The called function looks like the following: And the MainWindow (minimal working example): The problem is that now the command prompt IS the main application, so if i close 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 is 5.12.3 Answer Considering that this is caused

Advertisement