macos autostart fix
This commit is contained in:
parent
51f7e6811e
commit
491a09b175
3 changed files with 19 additions and 3 deletions
|
|
@ -80,8 +80,13 @@ int main(int argc, char *argv[])
|
|||
app.setQuitOnLastWindowClosed(false);
|
||||
|
||||
MainWindow mainWindow;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
if (parser.isSet("a")) mainWindow.showOnStartup();
|
||||
else mainWindow.show();
|
||||
#else
|
||||
mainWindow.showOnStartup();
|
||||
#endif
|
||||
|
||||
if (app.isPrimary()) {
|
||||
QObject::connect(&app, &SingleApplication::instanceStarted, &mainWindow, [&](){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue