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 restore a default size of the created buttons(custom plugin of Qt Designer) on the form? Rebuild ui file with default parameters of widgets.
QtWS25 Last Chance

How to restore a default size of the created buttons(custom plugin of Qt Designer) on the form? Rebuild ui file with default parameters of widgets.

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 980 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
    atlantic-sys
    wrote on last edited by
    #1

    I have created a custom plugin for Qt Designer it simply QPushButton class with corrected size of button that creates(modified default values of the size), but if i have a many forms with this buttons(with different size each button) and i need to restore their size to default (wich previously was generated in ui file when the button is created) it is possible? If possible then how? I could provide any information if needed.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      The size of a QPushButton is driven by the layout you place it in, the minimum/maximum size constraints it has, and its size policies. The closest thing that a button has to a 'default' size is the value computed and returned by sizeHint(), which is driven by the button text, icon etc.

      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