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. QStackedWidget: stretches to the full app screen
Forum Updated to NodeBB v4.3 + New Features

QStackedWidget: stretches to the full app screen

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 547 Views 2 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.
  • sitesvS Offline
    sitesvS Offline
    sitesv
    wrote on last edited by sitesv
    #1

    Hi!
    On the central widget, there is a QFrame and QStacedWidget.
    When I apply a horizontal layout, QStackedWidget stretches to the full app screen.
    No QFrame visible.
    I need a QFrame on one side of the interface and a QStackedWidget on the other.
    How to fix this?

    Thanks!

    jsulmJ 1 Reply Last reply
    0
    • sitesvS sitesv

      Hi!
      On the central widget, there is a QFrame and QStacedWidget.
      When I apply a horizontal layout, QStackedWidget stretches to the full app screen.
      No QFrame visible.
      I need a QFrame on one side of the interface and a QStackedWidget on the other.
      How to fix this?

      Thanks!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @sitesv QFrame is empty I guess?
      You can play with https://doc.qt.io/qt-5/qwidget.html#sizePolicy-prop

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      sitesvS 1 Reply Last reply
      0
      • jsulmJ jsulm

        @sitesv QFrame is empty I guess?
        You can play with https://doc.qt.io/qt-5/qwidget.html#sizePolicy-prop

        sitesvS Offline
        sitesvS Offline
        sitesv
        wrote on last edited by sitesv
        #3

        @jsulm said in QStackedWidget: stretches to the full app screen:

        QFrame is empty I guess?

        For an example, I added a label to the qframe. And after applying layout the situation is the same.
        I set size policy for QFrame as Fixed for H. Situation is the same.
        Only after setting a minimum width size problem was fixed.
        This situation is the same also for qtabwidget.
        But for qwidget it is ok from the beginning.

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

          Hi
          You can ask the layout to share space equally

          alt text

          alt text

          1 Reply Last reply
          5

          • Login

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