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. Editing a QFrame using QtDesigner
Forum Updated to NodeBB v4.3 + New Features

Editing a QFrame using QtDesigner

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 502 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.
  • mrjbomM Offline
    mrjbomM Offline
    mrjbom
    wrote on last edited by
    #1

    Hello.
    I have a system of scenes and for each scene I would like to have my own set of buttons and other things.

    Now I create a separate QFrame and consistently add the necessary widgets from the code of a specific scene.
    7207e444-988c-4bf3-a087-eeb289898ebf-image.png

    I would like to be able to create separate forms that will relate to my QFrame and load them as needed.
    How can I do this?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you mean have several "scenes" and be able to switch between them like with a QStackedWidget ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      mrjbomM 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Do you mean have several "scenes" and be able to switch between them like with a QStackedWidget ?

        mrjbomM Offline
        mrjbomM Offline
        mrjbom
        wrote on last edited by
        #3

        @SGaist,
        OK, if I'm going to use QStackedWidget, can I create a separate widget using QtDesigner?

        I want to create my own widget in QtDesigner for each scene and load them when compiling, then just switch them using QStackedWidget. Is this correct?

        JonBJ 1 Reply Last reply
        0
        • mrjbomM mrjbom

          @SGaist,
          OK, if I'm going to use QStackedWidget, can I create a separate widget using QtDesigner?

          I want to create my own widget in QtDesigner for each scene and load them when compiling, then just switch them using QStackedWidget. Is this correct?

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #4

          @mrjbom said in Editing a QFrame using QtDesigner:

          load them when compiling

          Not sure what you mean here. Nothing gets "loaded" while compiling.

          You can design each of your widgets as separate .ui files from Designer. These will result in separate classes in C++ code, from the uic run on the .ui files.

          It is then up to you when these get created/instantiated at run time. You can create them dynamically, when wanted, via new MyWiget1(). And you can then insert each of these into a QStackedWidget via its addWidget(QWidget *widget) method. You show any one them at a given time via QStackedWidget::setCurrentWidget(QWidget *widget).

          Does that answer what you are seeking to do?

          1 Reply Last reply
          2

          • Login

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