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. splitter setStretchFactor doesnot work in stackedwidget

splitter setStretchFactor doesnot work in stackedwidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 370 Views
  • 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.
  • johnson54J Offline
    johnson54J Offline
    johnson54
    wrote on last edited by aha_1980
    #1

    I put a tree widget in the left and a stacked widget in the right, and use horizntal splitter for layout
    the following code is used for initialization
    ui->splitter->setStretchFactor(0,4);
    ui->splitter->setStretchFactor(1,6);
    but it doesnot work, the width of tree widget and of stacked widget is not 4:6

    jsulmJ 1 Reply Last reply
    0
    • johnson54J johnson54

      I put a tree widget in the left and a stacked widget in the right, and use horizntal splitter for layout
      the following code is used for initialization
      ui->splitter->setStretchFactor(0,4);
      ui->splitter->setStretchFactor(1,6);
      but it doesnot work, the width of tree widget and of stacked widget is not 4:6

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

      @johnson54 said in splitter setStretchFactor doesnot work in stackedwidget:

      horizntal splitter

      I guess you mean vertical as you said you put widgets in the left and right sides?
      So, it should be 2:3, what is it now?

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

      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