![]() Registered Member ![]()
|
Let me preface this post by saying that I have very little experience programming in c++ and working with KDE development.
I am developing a plasmoid similar to http://kde-apps.org/content/show.php/Yet+Another+Window+Control?content=139916. Except I am mainly re-purposing it to only work with the active maximized window. So if no windows are maximized then the plasmoid is hidden and it only operates on the active maximized window. That part I have covered and is working wonderfully. The part that I want to get a grasp over is how to hide the titlebar of the active maximized window. I know I can add "BorderlessMaximizedWindows=true" to the user's kwinrc, but I wish to hide the titlebar programatically to avoid messing with the user's settings and to also ensure that if the plasmoid is removed that maximized windows will behave like they did before the plasmoid was added. Here is the method that handles detecting the maximized window and setting up the window controls for it. Could somebody give me a hint as to how I can hide the titlebar?
|
![]() Registered Member ![]()
|
So I found that you can get and set window flags http://doc.qt.nokia/latest/qt.html/#WindowType-enum through the QWidget class. The flag I'm specifically wanting to set is Qt::FramelessWindowHint. I'm supposed to be able to pass the window id of the active window to QWidget's find() function and it will return a QWidget object so I can manipulate the window flags. However, it always returns 0 (not found).
Here is a stub of the function above that includes the code I've put in. Any ideas on why QWidget::find() always returns 0 even though the window ID passed to it obviously belongs to a valid window?
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft