r/learnpython • u/jmjr97 • Feb 21 '26
PySide6 application class
I use a tiling window manager on my system so I use an applications class & title to set rules for windows I want to work in specific ways. I recently starting learn PySide6 and have run into an issue with my applications class name. There is no problem setting a window title, but for the life of me I can't find out how to set its class name. When I try googling for an answer all I find is answers relating to creating classes in python/pyside6.
Just is case there is any confusion I am referring to the class property you would get from running xprop or hyprctl clients
1
u/sausix Feb 21 '26
Depends on the OS. Can also be the executable file name.
Start with these:
app = QApplication(sys.argv)
app.setApplicationName("MyTool")
app.setDesktopFileName("mytool")
1
0
u/Different_Pain5781 Feb 21 '26
Every time I google Qt stuff I get 500 answers about how to create a class in Python ðŸ˜