Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. linking files help needed.

linking files help needed.

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 475 Views
  • 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 Offline
    B Offline
    bebahost
    wrote on last edited by
    #1

    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
    0
    • M Offline
      M Offline
      mjsurette
      wrote on last edited by
      #2

      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
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved