Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved linking files help needed.

    General and Desktop
    2
    2
    384
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bebahost last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • M
        mjsurette last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post