Results 1 to 2 of 2

Thread: Prevent splash screen from closing itself

  1. #1
    Join Date
    Nov 2008
    Posts
    38
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Prevent splash screen from closing itself

    Hi.

    I want to create a window that looks like a splash screen but does not behave like one.

    It must
    * have no window decorations
    * appear centred on the monitor
    * have no title bar presence
    * and not close itself when clicked.

    I've tried subclassing QSplashScreen and using a vanilla QWidget with Qt::SplashScreen window flag, either of these methods satisfies points 1 to 3. The problem is the self-closing behaviour -- it self closes even when it's not a SplashScreen but just flagged as one.

    I've tried overriding hideEvent and closeEvent to e->ignore() them, but that had no effect.

    What should I do instead?

    Thanks a lot.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Prevent splash screen from closing itself

    Remove the Qt::SplashScreen flag from the widget. Use Qt::FramelessWindowHint to get rid of the decorations and position the widget yourself.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Problem with Splash Screen ?
    By vinod in forum Qt Programming
    Replies: 13
    Last Post: 11th April 2020, 17:15
  2. splash screen problem
    By wizarda in forum Qt Programming
    Replies: 9
    Last Post: 15th January 2011, 02:05
  3. How to Keep Splash Screen and App on Same Display
    By ajb_advance in forum Qt Programming
    Replies: 2
    Last Post: 4th March 2009, 11:49
  4. Splash screen showing for two seconds
    By Koas in forum Qt Programming
    Replies: 5
    Last Post: 17th October 2008, 19:40
  5. Splash Screen
    By Salazaar in forum Newbie
    Replies: 27
    Last Post: 4th June 2007, 17:31

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.