Results 1 to 3 of 3

Thread: QSplashscreen, Qt.WindowStaysOnTopHint And Title Bar

  1. #1
    Join Date
    Jun 2009
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QSplashscreen, Qt.WindowStaysOnTopHint And Title Bar

    Hello

    I'm using a QSplashscreen for the starting of my Application, the problem I'm encountering is that when I'm using the Window Flag Qt.WindowStaysOnTopHint the QSplashscreen stays on top of every other windows but it also shows a Title bar and a frame ( same on Mac Os X and Windows ).
    Anyone have an idea of what to do to avoid this ?

    Thx,

    KS
    Attached Images Attached Images

  2. #2
    Join Date
    May 2009
    Posts
    62
    Thanks
    2
    Thanked 16 Times in 15 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSplashscreen, Qt.WindowStaysOnTopHint And Title Bar

    I guess you set the window flags using QWidget::setWindowFlags:

    Qt Code:
    1. QSplashScreen splash(pixmap);
    2. splash.setWindowFlags(Qt::WindowStaysOnTopHint);
    To copy to clipboard, switch view to plain text mode 

    This goes wrong, because you reset all other flags, especially Qt::SplashScreen.
    You should try:

    Qt Code:
    1. QSplashScreen splash(pixmap);
    2. splash.setWindowFlags(splash.windowFlags() | Qt::WindowStaysOnTopHint);
    To copy to clipboard, switch view to plain text mode 

    or even simpler:

    Qt Code:
    1. QSplashScreen splash(pixmap, Qt::WindowStaysOnTopHint);
    To copy to clipboard, switch view to plain text mode 

    because the constructor automatically adds other required flags.

  3. #3
    Join Date
    Jun 2009
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QSplashscreen, Qt.WindowStaysOnTopHint And Title Bar

    Excellent !
    I didn't realised that it was resetting the other flags, but now that make sense. Thanks

Similar Threads

  1. Replies: 4
    Last Post: 23rd December 2008, 20:41
  2. QSplashScreen Weirdness
    By mclark in forum Qt Programming
    Replies: 11
    Last Post: 19th November 2007, 06:49
  3. Setting the title bar
    By Krish_ng in forum Qt Programming
    Replies: 1
    Last Post: 18th July 2007, 11:55

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
  •  
Qt is a trademark of The Qt Company.