Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. window geometry

    Log in to post
    • All categories
    • D

      Unsolved How to position windows in the bottom right of the screen?
      General and Desktop • window window geometry alignment screen widget • • dannymozzer

      9
      0
      Votes
      9
      Posts
      2849
      Views

      SGaist

      Use QScreen::availableGeometry. It provides the geometry excluding window manager reserved areas.

    • E

      Unsolved Too many widgets breaks window management
      General and Desktop • window geometry qsplitter qframe qwidget • • Eric Singer

      7
      0
      Votes
      7
      Posts
      583
      Views

      Chris Kawa

      @Eric-Singer Because my suggestion is not to limit the size of the parent but rather to limit what the layout reports as the minimum size required. minimumSize() returns the minimum amount of space the widget needs to provide so that the layout can fit all the widgets inside it.
      maximumSize() is the size beyond which the layout can't reasonable grow the widgets inside.

      Maximum size is not useful for this case. Your problem is that the parent widget grows too much and it grows because the minimum size of the layout grows i.e. the minimum amount of space required to lay out the widgets inside grows.
      If you return a fake limit, one that is smaller than the sum of all the widgets inside, the parent will be able to keep its size despite all the children in the layout not fitting (visually they will be cropped). You could, for example, return the minimum of the base implementation's value that calculates it based on the content size and some constant value of yours, beyond which you don't want to grow.

      To be honest that's pretty much what a scroll area does and I think the suggestion given by @SGaist is a better one as it already does that work for you.

    • M

      Unsolved Getting window geometry for all desktop windows
      General and Desktop • window geometry global • • muldjord

      3
      0
      Votes
      3
      Posts
      727
      Views

      M

      @raven-worx I will look into platform specific code. Thank you.

    • W

      Solved Broken QWidget window states and geometries
      General and Desktop • qwidget fullscreen maximized window geometry bug • • Wilk

      4
      0
      Votes
      4
      Posts
      2374
      Views

      ValentinMichelet

      @Wilk said:

      The reason that it did not work with QMainWindow or QWidget is that those classes does not implement fullScreen as full featured property - it can not be set with setFullScreen() slot.

      I see, thanks for the precision.

      @Wilk said:

      Thanks alot

      No problem, I hope your bug report will be helpful for other people.