Skip to content
  • 0 Votes
    2 Posts
    637 Views
    A

    @jeanmilost
    Your logic seems to be correct.
    What you have to do is to move the re-calculation of Scrollbar size & position to the Rectangle rcPageContainer because you are applying scale for that.

    Rectangle { id: rcPageContainer objectName: "rcPageContainer" ... /// called when page viewport width changed onWidthChanged: { sbHorz.size = rcPageViewport.width / rcPageContainer.width sbHorz.position = Math.min(Math.max(sbHorz.position, 0.0), 1.0 - (sbHorz.size)); } /// called when page viewport height changed onHeightChanged: { sbVert.size = rcPageViewport.height / rcPageContainer.height sbVert.position = Math.min(Math.max(sbVert.position, 0.0), 1.0 - (sbVert.size)); } }
  • 1 Votes
    3 Posts
    2k Views
    M

    @jpnurmi Thanks for the clarification!

  • 0 Votes
    4 Posts
    1k Views
    SGaistS

    Hi,

    Looks like you are trying to use a Ui_otherPage without setting it up.

    Why not use the widget you created with it ?

  • 0 Votes
    2 Posts
    2k Views
    R

    My first thought is that QGroupBox probably provides a sizehint() that is zero if the widget is not visible where your other widget probably does not do this.

    The QStackedWidget would provide a sizehint() based on all of the children. When you hide the children you make the end result no smaller than the largest child.

    Another idea to implement this is to have a common set of options always visible and show/hide the additional parts that are unique to the 'multi' and 'other' views. This will autosize.

  • 0 Votes
    4 Posts
    9k Views
    SGaistS

    Hi,

    Sure you can. One thing that you might use is a QProgressBar (with min and max at the same value so it's animated as in don't know how long it can take. Or you can use a gif in a QMovie object.