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. QSizePolicy::Fixed and QGraphicsLayoutItem - confusion

QSizePolicy::Fixed and QGraphicsLayoutItem - confusion

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 439 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.
  • A Offline
    A Offline
    Asperamanca
    wrote on last edited by
    #1

    When I use QGraphicsLayouts, and SizePolicy "fixed", which of the sizeHints is actually used?

    In the enum QSizePolicy::Policy, the policy "Fixed" is described as:

    bq. The QWidget::sizeHint() is the only acceptable alternative, so the widget can never grow or shrink (e.g. the vertical direction of a push button).

    However, for a QGraphicsLayoutItem, no sizeHint() exists - the overload requires that a specific sizeHint (either minimum, maximum or preferred) is returned.

    In consequence, if I want to use the "Fixed" policy, do I

    • just set the preferred size, or
    • set minimum and maximum size, or
    • set minimum, maximum AND preferred size
      ?
    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