Solved Popup widget before mainwindow appears
-
how to Popup a widget before the main window appears (something like a login widget) but I need that instantiated class to be accessed in mainwindow.
Like I have Connect widget that should pop up before the mainwindow and the instance of the Connect widget that has popped should be accessed in the mainwindow.
Any suggestion on how this should be done will be very helpful.
-
Hi
You can just make it live in
mainwindow but show in main.#include <logindialog.h> int main(int argc, char* argv[]) { QApplication a(argc, argv); MainWindow w; w.login = new LoginDialog(&w); // setLogin( new LoginDialog ) // would be nicer w.login ->exec();// show login w.show(); return a.exec(); }
runable project:
https://www.dropbox.com/s/r5c9bna4mjw1zlt/mylogin.zip?dl=0 -
Thanks. It works
-
@saitej
Please mark that issue is solved