Question

I'm looking to edit the title bar in a python window. I have compiled multiple different python widgets into one window using a main.py to get the ball rolling. I feel like I should add a piece of code in the main.py file rather than the widgets to change the title and icon in the title bar of the window.

Specifically, I want to edit the title and change the icon in a python generated window.

Thanks!

Was it helpful?

Solution

You should use the setWindowTitle(title) method on the main window.

Also, and unless the title changes dynamically in your app, it's probably better to change it in your interface file (if you made one, using QtDesigner for instance)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top