Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. (Solved)Putting multiple in a single header and source file

(Solved)Putting multiple in a single header and source file

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 2.0k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    tanclanship
    wrote on last edited by
    #1

    Good day. Im still a newbie in NokiaQt. So far using NokiaDesigner I manage to link mainwindow to dialog1 using a button. But the method I use (Ctrl+N -> QT->QT Designer form class) is that each time I create a new dialog I need to have their own headers and also their own source file . I wonder by using (Ctrl+N -> QT ->QT Designer Form) can I create many dialog without creating too much header and sourcefile.Is there any method to it ?

    @void mainwindow::on_pushButton_clicked()
    {
    QDialog *fresh = new QDialog();
    Ui::dialog1 ui;
    ui.setupUi(fresh);
    fresh->show();
    }@

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      No, this is not possible. You can do this by manually adding the code, but not with the Creator.

      Anyways, it's good practice to put each class into it's own header and implementation file (at least the GUI classes), unless they belong together very tightly. It will save you compile time, as only one class must be rebuilt if you change it.

      EDIT: It's Creator, not Designer, sorry.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tanclanship
        wrote on last edited by
        #3

        Thanks..

        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