![]() Registered Member ![]()
|
In the list of window properties kwin provides, one of those properties is the class name. However, I cannot find out what this is or how to set it. Does it correspond to a particular property in X11? Is there a way to set it for ordinary Qt windows?
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
![]() Registered Member ![]()
|
It looks like this corresponds to the WM_CLASS property, but I can't figure out how to set this in qt (or, rather, pyqt).
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
![]() Registered Member ![]()
|
It is the application name in Qt (QCoreApplication::applicationName).
To change the class of a particular window, you have to call X methods directly.
connect(post, SIGNAL(readSignature()), qapp, SLOT(quit()));
|
![]() Registered Member ![]()
|
Didn't know that, thanks ![]() Regards
Damnshock, proud to be a member of KDE forums since 2008-Oct.
|
![]() Registered Member ![]()
|
Do you know if there is a way to do that within pythong? This is a python window using pyqt4.
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
![]() Registered Member ![]()
|
What I said before is not true. I said that from memory but, later, I could not verify it. Sorry about that.
(See http://www.xfree86.org/current/X.7.html#toc13 ) Instead, the application name comes from the executable name (this has been checked from Qt's implementation of QApplication in X11). This works for compiled and ruby script executables. e.g. If the executable is called appname.rb and you execute that, the windows will get that class name: appname.rb. Instead, if it is called main.rb, or main.py the windows will get a bad class name, main.py. or... The hard way (X11 way) See PlasmaApp::setWmClass() in kdebase/workspace/plasma/desktop/shell/plasmaapp.cpp
connect(post, SIGNAL(readSignature()), qapp, SLOT(quit()));
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft