Results 1 to 11 of 11

Thread: Don't show on panel?

  1. #1
    Join Date
    Nov 2007
    Posts
    10
    Thanks
    1

    Default Don't show on panel?

    I am trying to write a simple aplication (a continuously changing label on a window on the upper left side of the screen) and I don't want it to be seen on panel but only on system tray.Because it will run for a long time. How can I do that? Thanks.

    PS: I am using python and pyqt.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Don't show on panel?

    I take it that you did manage to have an icon in the system tray, and that you only want to remove the task from the taskbar.
    Note, that this operation is probably not portable.
    Googling suggests that:
    Adding WS_EX_TOOLWINDOW and removing WS_EX_APPWINDOW, should do the trick.
    http://msdn.microsoft.com/en-us/libr...ng_Taskbar_But
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Nov 2007
    Posts
    10
    Thanks
    1

    Default Re: Don't show on panel?

    Thank you for your reply but I did not understand what you mean. I have only one window and I am using Linux but I want it to be portable. I aded a photo to show what I wanted .
    Attached Images Attached Images
    • File Type: jpg 2.jpg (98.7 KB, 30 views)

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Don't show on panel?

    You didn't say for which window managing system you want to achieve this, I just assumed it was windows.
    From the screenshot it looks like its KDE.
    As I said, this is not portable, so the solution is specific for the windowing system (in this case KDE).
    You might have more luck in KDE programming related forums.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Don't show on panel?

    You could use Qt::SplashScreen for that task.
    In program use this->setWindowFlags( Qt::SplashScreen );
    Ofcourse that will force program to be only splashscreen but, if I understand what You want to do correctly, this should be enoght.
    Tested on Win, I don't know if kdm will do the same on KDE.

  6. #6
    Join Date
    Nov 2007
    Posts
    10
    Thanks
    1

    Default Re: Don't show on panel?

    Thanks Talei. It works, but when I clicked on the window it disappears. I have context menu on the window, so I must click on it. Do you have any solution for it?

  7. #7
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Don't show on panel?

    Well this is a splash screen, so it's probably not the best way of doing it, but the fastest one.
    I don't know why it disappear, maybe You are doing something else in program that force this behaviour (I use QWidget as base class), or simply it hides behind plasmoids on KDE (I doubt about that).
    I tested this flag with my programs (one that use context menu) and programs behaves normally.
    I will try to test it on KDE and see if something goes wrong.
    In meantime try other flags with conjunction with splashscreen like:
    Qt::X11BypassWindowManagerHint
    and
    Qt::WindowStaysOnTopHint
    Also I use this code in my main class constructor, it last "entry" after all other initializations are done, so maybe this will help.
    Last edited by Talei; 26th May 2010 at 15:42.

  8. #8
    Join Date
    Nov 2007
    Posts
    10
    Thanks
    1

    Default Re: Don't show on panel?

    I used hints (Qt::X11BypassWindowManagerHint, Qt::WindowStaysOnTopHint), my base class was qmainwindow, I changed it to qwidget. but nothing changed.


    the link high_flyer gave says:

    The Shell creates a button on the taskbar whenever an application creates a window that isn't owned. To ensure that the window button is placed on the taskbar, create an unowned window with the WS_EX_APPWINDOW extended style. To prevent the window button from being placed on the taskbar, create the unowned window with the WS_EX_TOOLWINDOW extended style. As an alternative, you can create a hidden window and make this hidden window the owner of your visible window.

    I will try that!
    Thank you for your help!

  9. #9
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Don't show on panel?

    AFAIK This will not work on KDE, because WS_EX_TOOLWINDOW is a WinApi.

  10. The following user says thank you to Talei for this useful post:

    neverlander (26th May 2010)

  11. #10
    Join Date
    Nov 2007
    Posts
    10
    Thanks
    1

    Default Re: Don't show on panel?

    No I did not use that. I tried to make a hidden window and I made that window parent for my real window.Bu It didnot work either. When I hide the window my real window becomes hidden too.

  12. #11
    Join Date
    Nov 2007
    Posts
    10
    Thanks
    1

    Default Re: Don't show on panel?

    I found the solution. I set the window flag as "Qt.Popup". Now there is no window on the panel.
    Last edited by neverlander; 27th May 2010 at 21:43.

Similar Threads

  1. Scrollable Panel
    By qtoptus in forum Qt Programming
    Replies: 1
    Last Post: 5th May 2010, 10:07
  2. collapsible panel/frame
    By prashant in forum Qt Programming
    Replies: 4
    Last Post: 5th September 2009, 18:17
  3. What is the best way to create a file management panel?
    By DIMEDROLL in forum Qt Programming
    Replies: 0
    Last Post: 24th September 2008, 08:49
  4. Replies: 27
    Last Post: 14th May 2008, 10:39
  5. left/right panel with buttons
    By swiety in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2008, 13:12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.