Results 1 to 17 of 17

Thread: Qt::FramelessWindowHint

  1. #1
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qt::FramelessWindowHint

    In Qt4.0.0 & Qt4.0.1 I used flag Qt::FramelessWindowHint to get off button on taskbar. But now in 4.1.0 & 4.1.1 it doesn't work. Can anyone explain what happened and what to do?

    Qt4.1.1 with MinGW on WinXP Pro.

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt::FramelessWindowHint

    Keep trying to find out but without any result yet

  3. #3
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt::FramelessWindowHint

    Can anybody help me with this?

  4. #4
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt::FramelessWindowHint

    could you post some code to see how you set this flag?

    Look at this thread that I posted where I use it succesfully:
    http://www.qtcentre.org/forum/showthread.php?t=2039
    Last edited by SkripT; 3rd May 2006 at 16:20.

  5. #5
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt::FramelessWindowHint

    In constructor of my class:
    Qt Code:
    1. setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
    To copy to clipboard, switch view to plain text mode 

  6. #6
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt::FramelessWindowHint

    Quote Originally Posted by L.Marvell
    ... Qt::FramelessWindowHint to get off button on taskbar. But now in 4.1.0 & 4.1.1 it doesn't work. Can anyone explain what happened and what to do?
    what do you mean get off button on taskbar....be more clear.

    also please stick the code as much as possible so that we can relate to your problem...your function declaration will not help us understand your problem!

    Nupul

  7. #7
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt::FramelessWindowHint

    I mean that I don't need button of my application on windows' taskbar. In earlier versions of Qt the same string of code setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); worked perfect: app was without titlebar and without that button on taskbar. Now the button appears but it doesn't have context menu.
    See attached screenshot.
    Attached Images Attached Images

  8. #8
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt::FramelessWindowHint

    AFAIK Qt::FramelessWindowHint is not useful for what you want to achieve. It only creates a window without the buttons (maximize, minimize and close) and the border around the window....

  9. #9
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt::FramelessWindowHint

    Quote Originally Posted by SkripT
    AFAIK Qt::FramelessWindowHint is not useful for what you want to achieve. It only creates a window without the buttons (maximize, minimize and close) and the border around the window....
    But worked in Qt < 4.1.x. Anyway, what to do now? Who knows?

  10. #10
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt::FramelessWindowHint

    Quote Originally Posted by L.Marvell
    But worked in Qt < 4.1.x. Anyway, what to do now? Who knows?
    Have you tried to set some other window flags? Qt::Popup, Qt::SplashScreen,...

  11. #11
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt::FramelessWindowHint

    Quote Originally Posted by SkripT
    Have you tried to set some other window flags? Qt::Popup, Qt::SplashScreen,...
    I've tried all of flags but without any good result

  12. #12
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt::FramelessWindowHint

    Ok, it seems Qt::Tool creates window without taskbar button, but there is another problem. When clicking on "Ok" or "Cancel" of any dialog that belongs to app - dialog closes but main window closes too
    If anybody wish he can download sources at http://www.badongo.com/file/596445 and look in. Window flags set in clockwindow.cpp at 27 row. Try to play with it.

  13. #13
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt::FramelessWindowHint

    Have you tried to open the dialogs as top level (with no parent)?

  14. #14
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt::FramelessWindowHint

    Quote Originally Posted by SkripT
    Have you tried to open the dialogs as top level (with no parent)?
    Nope but will try. Thanks for advice!

  15. #15
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt::FramelessWindowHint

    Boom... Main window closes even when pressing "Ok" in standard About Qt dialog

  16. #16
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt::FramelessWindowHint

    It seems it doesn't matter has dialog parent or not. Main window closes anyway. It's pitty

  17. #17
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt::FramelessWindowHint

    Well all Ok. Works with setQuitOnLastWindowClosed(false).

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.