Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    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.

    General and Desktop
    2
    2
    868
    Loading More Posts
    • 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
      atlantic-sys last edited by

      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 Reply Quote 0
      • C
        ChrisW67 last edited by

        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 Reply Quote 0
        • First post
          Last post