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. is it possible to add layout in QStackedLayout?

is it possible to add layout in QStackedLayout?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 2.6k 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.
  • Q Offline
    Q Offline
    qtpi
    wrote on last edited by
    #1

    hi guys. I'm wondering if it's possible to add a QHBoxLayout/QVBoxLayout in a QStackedLayout, so each page of stackedLayout would show different patterns.

    I searched for a while and didn't find anything. I tested addItem but it seems not the one I'm looking for.

    Thnx in advance.

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

      Hi, when you want to
      mix layouts, its often easier to insert a place holder.
      So you create a QWidget, insert what ever layout
      u like in it and then add this widget to the QStackedLayout.
      And then u inset the "real" widget into this placeholder widgets->layout()

      1 Reply Last reply
      1
      • Q Offline
        Q Offline
        qtpi
        wrote on last edited by
        #3

        @mrjj said:

        easier

        holy moly, that works, thanks very much.

        mrjjM 1 Reply Last reply
        0
        • Q qtpi

          @mrjj said:

          easier

          holy moly, that works, thanks very much.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @qtpi
          :)
          Yes and you can even insert another
          placeholder and have sub - sub layouts if u feel kinky.

          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