[SOLVED]this->hide() doesn't work in constructor
-
I wish to hide (minimize) the application to tray icon on startup. But
@this->hide()@
or
@this->setvisible(false)@
both don't work. The main window is always displayed! -
Hi,
I think it's because your main window is shown in your main.cpp. It shoud be something like :
@int main(int argc, char *argv[]) {
QApplication a(argc, argv); MainWindow w; w.show(); return a.exec();
}@
Just remove w.show();
-
use @showMinized();@
to show it again, you may use @showMaximized();@
or @showNormal();@
-
Thanks a lot! worked like a charm