Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Reserve screen-space or preventing window overlapping
Hi, thanks for taking interest in this thread.
I've been looking for a while on the Internet and i haven't found so far how to prevent window overlapping or reserve space for a window using Qt4. The idea is to be able to make a desktop panel/dock application, much like gnome-panel or docky, cairo-dock. I have found "how to do this with Gtk on StackOverflow":http://stackoverflow.com/questions/3859045/preventing-window-overlap-in-gtk
Please note i am using PySide or PyQt on a Linux platform (Ubuntu).
I'd really appreciate your help.
ZapB last edited by
This is really a function of the window manager. Take a look at kwin, it already offers much of this functionality.
OK -- isn't Kwin KDE-specific? Shouldn't the program i build communicate to the X Window System the GUI needs reserved space? That's what is done using Gtk (see example above). Or did i misunderstand your suggestion?
X11 does not specify policy, so almost everything is client specific... There are some agreements on how to interpret stuff, but each client is free to ignore those.
Having said that: The _NET_WM_STRUT seems to be pretty universally accepted (and is even part of a freedesktop.org specification). I am sure you can find examples of how to use it from Qt by asking the search engine of your choice.
That approach is of course X11 specific. I am not aware of a way to set what you need in a cross-platform way though.
Thanks. The application i am making is intended for Linux only. I intend to use the _NET_WM_STRUT_PARTIAL as in my Gtk example. But i am not sure as to change the window properties. All i have found is that some of the Window properties as defined by "standards.freedesktop.org":http://standards.freedesktop.org/wm-spec/1.3/ar01s05.html, such as NET_WM_WINDOW_TYPE* can be "set with flags":http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qt.html#WindowType-enum . But i have no idea as to how the _NET_WM_STRUT or _NET_WM_STRUT_PARTIAL can be implemented. There seems to be no flag for this.
Is there any way to set X window client properties with Qt? I've not been lucky with Google.
I didn't get any luck with my researches. Any idea anyone?