Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Splash screen not showing on MacOS Ventura (13.0) (running on an Apple M1) and Qt 6.4.0.

Splash screen not showing on MacOS Ventura (13.0) (running on an Apple M1) and Qt 6.4.0.

Scheduled Pinned Locked Moved Unsolved General and Desktop
20 Posts 5 Posters 3.3k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TheFlyingMooseMan
    wrote on last edited by TheFlyingMooseMan
    #1

    Code:

        QPixmap pm(":/images/splash.png");
        QSplashScreen splash(pm);
        qDebug() << SB_DEBUG_INFO << pm.height() << pm.width();
    
        if(appStartUpFlag)
        {
            splash.show();
            _app->processEvents();   // defined in header:    QApplication*     _app;
            
            qDebug() << SB_DEBUG_INFO << "splash screen should show";
        }
    
        init();
    
        setupModels();
    
        refreshModels();
    
        setupUI();
    
        configureMenus();
    
        mw->setWindowTitle(mw->windowTitle() + " - " + dbm->databaseName() + " ("+Context::instance()->dataAccessLayer()->getDriverName()+")");
    
        _resetStatusBar();
    
        if(appStartUpFlag)
        {
            splash.finish(mw);
            qDebug() << SB_DEBUG_INFO << "splash screen done";
        }
    

    Output:

    0x1f4d62500 "15:47:13" ../app/Controller.cpp openMainWindow 223 splash screen should show
    qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
    qt.webenginecontext: 
    
    GL Type: core_profile
    Surface Type: OpenGL
    Surface Profile: CoreProfile
    Surface Version: 4.1
    QSG RHI Backend: OpenGL
    Using Supported QSG Backend: yes
    Using Software Dynamic GL: no
    Using Multithreaded OpenGL: yes
    
    Init Parameters:
      *  application-name MezzoForta%21 
      *  browser-subprocess-path /Users/roy/Qt/6.4.2/macos/lib/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess 
      *  disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture 
      *  disable-speech-api  
      *  enable-features NetworkServiceInProcess,TracingServiceInProcess 
      *  enable-threaded-compositing  
      *  in-process-gpu  
      *  use-gl core_profile 
    
    
    0x1f4d62500 "15:47:20" ../app/Controller.cpp openMainWindow 263 splash screen done
    
    

    Any hints are appreciated!

    Thanks,
    Roy

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Please provide a minimal compilable example that shows this behaviour.

      Did you check if you have the same issue with an older version of Qt ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      T 1 Reply Last reply
      0
      • D Offline
        D Offline
        DerReisende
        wrote on last edited by
        #3

        Interestingly I can confirm as well that I don't get a splash screen on my M1 MacBook. I tested Qt 6.3.2, 6.4.2 and 6.5b1 with an app that runs on windows and macOS. Qt versions are the ones from the online installer.
        I don't get any warnings and delaying startup (with calls to QCoreApplication::processEvents()) doesnt help. Really strange.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DerReisende
          wrote on last edited by
          #4

          One observation: Splash screen does NOT appear when the app is launched from within IDE (either CLion or Qt Creator tested). Splash DOES appear when the app is launched from Finder...

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            What about starting it from the command line ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            D 1 Reply Last reply
            0
            • SGaistS SGaist

              What about starting it from the command line ?

              D Offline
              D Offline
              DerReisende
              wrote on last edited by
              #6

              @SGaist Yeah, direct launching the executable from CLI does not show the splash screen.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Do you have any message coming out on the terminal that looks out of place ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • SGaistS SGaist

                  Hi,

                  Please provide a minimal compilable example that shows this behaviour.

                  Did you check if you have the same issue with an older version of Qt ?

                  T Offline
                  T Offline
                  TheFlyingMooseMan
                  wrote on last edited by
                  #8

                  @SGaist Here is one:

                  #include <QApplication>
                  #include <QDebug>
                  #include <QSplashScreen>
                  #include <QMainWindow>
                  
                  #include "ui_MainWindow.h"
                  
                  #define SB_DEBUG_INFO  QThread::currentThreadId() << QTime::currentTime().toString() <<  __FILE__ << __FUNCTION__ << __LINE__
                  
                  class MainWindow : public QMainWindow
                  {
                      Q_OBJECT
                  
                  public:
                      MainWindow()
                      {
                          ui.setupUi(this);
                      }
                  
                      Ui::MainWindow ui;
                  };
                  
                  void
                  sleep(int seconds)
                  {
                      QTime dieTime=QTime::currentTime().addSecs(seconds);
                      while(QTime::currentTime()<dieTime)
                      {
                          QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
                      }
                  }
                  
                  void displaySpashMountain(QApplication* _app)
                  {
                      QPixmap pm(":/images/splash.png");
                      QSplashScreen splash(pm);
                      qDebug() << SB_DEBUG_INFO << pm.height() << pm.width();
                  
                      splash.show();
                      _app->processEvents();
                      qDebug() << SB_DEBUG_INFO << "splash screen should show";
                  
                  
                      MainWindow* mw=new MainWindow();
                      qDebug() << SB_DEBUG_INFO << "sleep 10s";
                      sleep(10);
                      qDebug() << SB_DEBUG_INFO << "done sleep 10s";
                  
                      splash.finish(mw);
                      qDebug() << SB_DEBUG_INFO << "splash screen done";
                  
                  
                  }
                  
                  int main(int argc, char *argv[])
                  {
                      QApplication app(argc, argv);
                  
                      displaySpashMountain(&app);
                      return 0;
                  }
                  
                  
                  T 1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    Dariusz Maciejewski
                    wrote on last edited by Dariusz Maciejewski
                    #9

                    I have updated to Ventura and immediately noticed same issue with Qt 5.15.3. The dialog that has a Qt::SplashScreen type won't show up if I start the app from CLI, but works fine when started from the Finder.

                    The QML logic within the invisible dialog works fine (I properly receive a signal being emitted by a timer in the dialog QML file.

                    Changing the dialog type to:
                    Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint
                    "solves" the issue.

                    D 1 Reply Last reply
                    0
                    • T TheFlyingMooseMan

                      @SGaist Here is one:

                      #include <QApplication>
                      #include <QDebug>
                      #include <QSplashScreen>
                      #include <QMainWindow>
                      
                      #include "ui_MainWindow.h"
                      
                      #define SB_DEBUG_INFO  QThread::currentThreadId() << QTime::currentTime().toString() <<  __FILE__ << __FUNCTION__ << __LINE__
                      
                      class MainWindow : public QMainWindow
                      {
                          Q_OBJECT
                      
                      public:
                          MainWindow()
                          {
                              ui.setupUi(this);
                          }
                      
                          Ui::MainWindow ui;
                      };
                      
                      void
                      sleep(int seconds)
                      {
                          QTime dieTime=QTime::currentTime().addSecs(seconds);
                          while(QTime::currentTime()<dieTime)
                          {
                              QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
                          }
                      }
                      
                      void displaySpashMountain(QApplication* _app)
                      {
                          QPixmap pm(":/images/splash.png");
                          QSplashScreen splash(pm);
                          qDebug() << SB_DEBUG_INFO << pm.height() << pm.width();
                      
                          splash.show();
                          _app->processEvents();
                          qDebug() << SB_DEBUG_INFO << "splash screen should show";
                      
                      
                          MainWindow* mw=new MainWindow();
                          qDebug() << SB_DEBUG_INFO << "sleep 10s";
                          sleep(10);
                          qDebug() << SB_DEBUG_INFO << "done sleep 10s";
                      
                          splash.finish(mw);
                          qDebug() << SB_DEBUG_INFO << "splash screen done";
                      
                      
                      }
                      
                      int main(int argc, char *argv[])
                      {
                          QApplication app(argc, argv);
                      
                          displaySpashMountain(&app);
                          return 0;
                      }
                      
                      
                      T Offline
                      T Offline
                      TheFlyingMooseMan
                      wrote on last edited by
                      #10

                      @TheFlyingMooseMan @SGaist : is this enough of an example?

                      1 Reply Last reply
                      0
                      • D Dariusz Maciejewski

                        I have updated to Ventura and immediately noticed same issue with Qt 5.15.3. The dialog that has a Qt::SplashScreen type won't show up if I start the app from CLI, but works fine when started from the Finder.

                        The QML logic within the invisible dialog works fine (I properly receive a signal being emitted by a timer in the dialog QML file.

                        Changing the dialog type to:
                        Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint
                        "solves" the issue.

                        D Offline
                        D Offline
                        DerReisende
                        wrote on last edited by
                        #11

                        @Dariusz-Maciejewski I can confirm your workaround works here as well.

                        T 1 Reply Last reply
                        0
                        • D DerReisende

                          @Dariusz-Maciejewski I can confirm your workaround works here as well.

                          T Offline
                          T Offline
                          TheFlyingMooseMan
                          wrote on last edited by
                          #12

                          @DerReisende care to share your code? It did not work in my environment.

                          T 1 Reply Last reply
                          0
                          • T TheFlyingMooseMan

                            @DerReisende care to share your code? It did not work in my environment.

                            T Offline
                            T Offline
                            TheFlyingMooseMan
                            wrote on last edited by
                            #13

                            For all that's worth -- seems like no one seems to care anyways.
                            I downgraded my M1 mac mini to Big Sur and doing a fresh install (wipe out hard drive ya da ya da ...)
                            Splash screen is now working with exactly the same code in this configuration.
                            Wonder if anyone is going to react LOL :)

                            D 2 Replies Last reply
                            0
                            • T TheFlyingMooseMan

                              For all that's worth -- seems like no one seems to care anyways.
                              I downgraded my M1 mac mini to Big Sur and doing a fresh install (wipe out hard drive ya da ya da ...)
                              Splash screen is now working with exactly the same code in this configuration.
                              Wonder if anyone is going to react LOL :)

                              D Offline
                              D Offline
                              DerReisende
                              wrote on last edited by
                              #14

                              @TheFlyingMooseMan sorry didnt receive a notification that you replied to me. I am going to check if i can find the requested code again :)

                              1 Reply Last reply
                              0
                              • T TheFlyingMooseMan

                                For all that's worth -- seems like no one seems to care anyways.
                                I downgraded my M1 mac mini to Big Sur and doing a fresh install (wipe out hard drive ya da ya da ...)
                                Splash screen is now working with exactly the same code in this configuration.
                                Wonder if anyone is going to react LOL :)

                                D Offline
                                D Offline
                                DerReisende
                                wrote on last edited by
                                #15

                                @TheFlyingMooseMan this what I am using:

                                QSplashScreen splash(QPixmap(":/resources/splash.png"));
                                #if defined(Q_OS_MAC) && defined(Q_PROCESSOR_ARM)
                                #if QT_VERSION <= QT_VERSION_CHECK(6, 5, 0)
                                    //workaround invisible splash screen
                                    splash.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
                                #endif
                                #endif
                                    splash.show();
                                

                                Works for me™...

                                1 Reply Last reply
                                0
                                • T Offline
                                  T Offline
                                  TheFlyingMooseMan
                                  wrote on last edited by
                                  #16

                                  FWIW (Part 2):
                                  Upgraded to Ventura, upgraded XCode to 14.2, redownloaded Qt.
                                  Splash screen disappeared.

                                  Going back to Big Sur, and reupgrade to Ventura.
                                  This time I'll not upgrade XCode, but redownload Qt.

                                  1 Reply Last reply
                                  0
                                  • T Offline
                                    T Offline
                                    TheFlyingMooseMan
                                    wrote on last edited by
                                    #17

                                    Well, F that.
                                    I thought macos would allow me to go back to Big Sur just using time machine.
                                    It wants me to reinstall Big Sur and then restore from Time Machine.
                                    Since I don't get any responses on this thread, I won't investigate any further, let other people complain about this and let the ingenious minds at Qt prioritize this and figure this out.
                                    Fact is that something has changed in macos libraries. This something is not taken into account by Qt.
                                    My old style HFL 0.02.

                                    SGaistS 1 Reply Last reply
                                    0
                                    • T TheFlyingMooseMan

                                      Well, F that.
                                      I thought macos would allow me to go back to Big Sur just using time machine.
                                      It wants me to reinstall Big Sur and then restore from Time Machine.
                                      Since I don't get any responses on this thread, I won't investigate any further, let other people complain about this and let the ingenious minds at Qt prioritize this and figure this out.
                                      Fact is that something has changed in macos libraries. This something is not taken into account by Qt.
                                      My old style HFL 0.02.

                                      SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #18

                                      @TheFlyingMooseMan the best way to make this known is to open a ticket on the bug report system. That way the Qt developers will be made aware of this change.

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      T 1 Reply Last reply
                                      0
                                      • SGaistS SGaist

                                        @TheFlyingMooseMan the best way to make this known is to open a ticket on the bug report system. That way the Qt developers will be made aware of this change.

                                        T Offline
                                        T Offline
                                        TheFlyingMooseMan
                                        wrote on last edited by
                                        #19

                                        @SGaist Thanks, created: https://bugreports.qt.io/browse/QTBUG-111750

                                        1 Reply Last reply
                                        0
                                        • D Offline
                                          D Offline
                                          David Fokkema
                                          wrote on last edited by
                                          #20

                                          I just added a comment with my observations. In particular, the main window show() method activates the Qt app. So if you run from the terminal, the call to show() is the moment the desktop's menu bar switches from 'Terminal' to 'python'. That's also the moment the splash screen shows up, briefly. This is because the splash screen's show() method does not make the app active. If you click on the dock icon of the Qt app during startup then the splash screen shows up just fine.

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved