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. How to anchor a widget during resize
Forum Updated to NodeBB v4.3 + New Features

How to anchor a widget during resize

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

    I have a widget inside a QScrollArea that I want to resize independently of the outer window. To this end, I've setup a dialog box with sliders connected to the widget's resize() method. The trouble is that when it resizes, its anchor point seems to move around: At times it's in the upper left corner. At others it's in the upper right. Ideally, I'd like for it to be in the center, so that growing the widget causes it to radiate outwards, while shrinking it acts in reverse.

    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