Unsolved Splash screen not showing on MacOS Ventura (13.0) (running on an Apple M1) and Qt 6.4.0.
-
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 toQCoreApplication::processEvents()
) doesnt help. Really strange. -
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...
-
What about starting it from the command line ?
-
@SGaist Yeah, direct launching the executable from CLI does not show the splash screen.
-
Do you have any message coming out on the terminal that looks out of place ?
-
@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; }
-
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. -
@TheFlyingMooseMan @SGaist : is this enough of an example?
-
@Dariusz-Maciejewski I can confirm your workaround works here as well.
-
@DerReisende care to share your code? It did not work in my environment.
-
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 :) -
@TheFlyingMooseMan sorry didnt receive a notification that you replied to me. I am going to check if i can find the requested code again :)
-
@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™...
-
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. -
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. -
@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.
-
@SGaist Thanks, created: https://bugreports.qt.io/browse/QTBUG-111750