PDA

View Full Version : Widget on desktop



hydr0g3n
22nd June 2007, 22:15
Hi, I programmed my own widget (inherits from QWidget) but I can't get it to display as I want. This widget has no parent.

Here is what I want:
- It should be displayed on the desktop (always if possible). This is the opposite of the "Always Stays On top" Property
- It shouldn't have an entry in the taskbar
- It shouldn't have a window frame (this is OK using self.setWindowFlags(QtCore.Qt.FramelessWindowHint) )

I tried to tweak the widget properties and the window properties, here are my tests:
- self.setWindowFlags(Qt.FramelessWindowHint|Qt.Tool )
This has a taskbar entry...
- self.setWindowFlags(Qt.FramelessWindowHint|Qt.Tool |Qt.X11BypassWindowManagerHint)
This has not taskbar entry but it always displays on top... If I call "self.lower()" to put it at the background, it just disapears and calling "self.show()" doesn't help...
- self.setWindowFlags(Qt.FramelessWindowHint|Qt.Tool Tip)
Same as the previous one... This has not taskbar entry but it always displays on top... If I call "self.lower()" to put it at the background, it just disapears and calling "self.show()" doesn't help...

I spent a lot of time trying to get the behaviour I want but I kinda stuck now... If anyone has an idea, please tell me :)

Note: I'm using Qt4 on KDE (pyQt4 in fact but it doesn't really matter).

wysota
5th July 2007, 10:12
KDE has a flag that allows a window to be "on bottom" of the window stack, but I don't think Qt has a flag to set it, so you have to use the native X11 API for that. I'm sure you can find detailed instructions on how to do it on freedesktop.org.

haldrik
17th August 2007, 05:11
Hi!! I have the same problem, what i need is exactly as this post suggest or ask, to dissable my app to be placed on the taskbar, cause does not use minimize fuction.

The idea is that the app could have the look of an Applet, like superkaramba does.

kernel_panic
17th August 2007, 06:44
setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::SubWindow);

Sandip
31st March 2008, 11:43
Hi,

I am facing a problem when using setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::SubWindow);

Whenever I pressed Alt + F4 (Application close operation), my widget disappeared but the process is still running. I am killing my process using task manager on windows.

If Qt::SubWindow flag is not used then application terminates otherwise not. I have seen this problem only under Qt 4.3.0 to Qt 4.3.3. It works fine under Qt 4.2.1 and Qt 4.4.0 (preview release).

Can you tell me what is reason?

:)

Thanks in advance.