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. Multiple windows (user interfaces)
Qt 6.11 is out! See what's new in the release blog

Multiple windows (user interfaces)

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 3 Posters 6.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.
  • P Offline
    P Offline
    pascal95abc
    wrote on last edited by
    #1

    Hello,

    how to have more than one UI and change between them with UI2.Show(); for example.

    Thank you

    Qt 4.7.3
    Symbian OS v9.4 / Symbian^1, S60 5th Edition
    on N97

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      I'm not quite sure about your question but there is nothing that stops you from having multiple top-level widgets (widgets having no parent, thus becoming an independent window).
      @
      QWidget *widgetA = new QWidget;
      QWidget *widgetB = new QWidget;

      widgetA->show();
      widgetB->show();
      @

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pascal95abc
        wrote on last edited by
        #3

        Ok, I can understand your idea. But I want to edit the widget in the designer because this is very convenient.

        So, the difference would be: I want to create the QWidget when compiling, following your idea, it would be created at runtime.

        Would be very nice if there is a way you can tell me :)

        Qt 4.7.3
        Symbian OS v9.4 / Symbian^1, S60 5th Edition
        on N97

        1 Reply Last reply
        0
        • G Offline
          G Offline
          giesbert
          wrote on last edited by
          #4

          Hi,

          sorry I do not 100% understand the problem.

          Let me try to re formulate:

          You want an application with several top level windows.

          you want to design those windows with designer

          All this si done during developement so no need to load *.ui files at runtime.

          Is this correct? If yes, do it the same way as with one designer created file :-) Replace QWidget from Lukas example with your class names, that is it.

          Nokia Certified Qt Specialist.
          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pascal95abc
            wrote on last edited by
            #5

            Thank you, this was a correct interpretation.
            At first I just wanted to know how to add a new UI file to my project, it was File>New>Qt>Qt Designer Form>templates\forms>Main Window.
            But do I really need "new QWidget" if the Widget as is exists in the file which I have already added to my pro file ?
            And how to call the form (by its filename? )?, btw I named it mainwindow2.ui

            Thank you for help, still learning.

            Qt 4.7.3
            Symbian OS v9.4 / Symbian^1, S60 5th Edition
            on N97

            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