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. When does QGraphicsWidget::size() become valid?

When does QGraphicsWidget::size() become valid?

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

    I have a custom QGraphicsWidget within a parent QGraphicsWidget, but not in a layout.

    To position my child graphicsWidget, I need to take it's size into account.

    When is the proper time in the code of my parent QGraphicsWidget to update the child graphicsWidget's position?

    I can't do it in the constructor, the size isn't yet valid then.
    I could connect to the geometryChanged() signal of the child graphicsWidget, but would also get position changes, not only size changes. This is a bit tricky since I am going to change the position.
    The first time I paint is too late, it would flicker.

    Other suggestions?

    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