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. Changing layout depent on class
Forum Updated to NodeBB v4.3 + New Features

Changing layout depent on class

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.3k 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.
  • A Offline
    A Offline
    akonshi
    wrote on last edited by
    #1

    Good morning everyone,

    The problem is the following:
    I have a base class, that has many derivatives. During the program different derivatives will be selected...

    I have a widget which shall show some controls (info labels, buttons, etc.), but the controls will differ from one derivative to the other. How can I change the layout by the selected derivative AND catch signals to interact with it?

    MfG
    akonshi

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Code_ReaQtor
      wrote on last edited by
      #2

      If I got it right, you are looking for "Dynamic Layout".

      There is an example in the Qt Demo.

      Please visit my open-source projects at https://github.com/Code-ReaQtor.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        You could have the derived classes all return a widget and embed those into a static layout. We do that a lot in Creator: e.g. the Projects mode is basically widgets from all kinds of plugins merged into one common layout.

        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