linking files help needed.
-
i come from php world i love using codeigniter, am new to qt. today i have been to link some file to the main file. my idea is when you lunch the app it brings a dialog box that enable choose options. like apple or mango. if you choose mango it takes you to mango panel. can one tell me how to do this please.
-
Welcome the the Qt world. You will find that Qt is very comprehensive and will let you do much. There are many fine examples and tutorials which will answer the most common questions. This is not one of them.
This is how I would do this.
The typical myappMain.cpp file looks like this.
#include "myapp.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); myapp w; w.show(); return a.exec(); }
Add a dialog for your selection process. Have the dialog select and show the right panel in your application before returning. Of course, to do this you would have to pass your application as a parameter to your dialog. Like so.
#include "myapp.h" #include "mydialog.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); myapp w; mydialog dlg(&w); dlg.show(); return a.exec(); }
I haven't tested this, but it should do what you want.