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. QT Designer : Resize QPushButton so it is always square
Forum Updated to NodeBB v4.3 + New Features

QT Designer : Resize QPushButton so it is always square

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt designerc++visual studiowindows 7 64 bi
4 Posts 2 Posters 4.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.
  • J Offline
    J Offline
    John_A._Myer
    wrote on last edited by
    #1

    Hello everyone,

    Is there a way to tell a couple of QPushButtons that they resize in a way, that they always stay "square" regarding to their size? If possible, inside Qt Designer.

    On resizing my QMainWindow, the buttons also resize, but they resize to rectangles etc. I want all the buttons to be always in size SxS (square).

    Some data:

    Qt Designer 5.6.0
    Windows 7 64
    Visual Studio 2015 Prof (Qt VS Tools - Plugin)
    C++

    jsulmJ 1 Reply Last reply
    0
    • J John_A._Myer

      Hello everyone,

      Is there a way to tell a couple of QPushButtons that they resize in a way, that they always stay "square" regarding to their size? If possible, inside Qt Designer.

      On resizing my QMainWindow, the buttons also resize, but they resize to rectangles etc. I want all the buttons to be always in size SxS (square).

      Some data:

      Qt Designer 5.6.0
      Windows 7 64
      Visual Studio 2015 Prof (Qt VS Tools - Plugin)
      C++

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @John_A._Myer You could use QToolButton

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • J Offline
        J Offline
        John_A._Myer
        wrote on last edited by
        #3

        @jsulm thank you for your fast reply.

        Just to be sure : you mean using QToolButton instead of QPushButton?

        jsulmJ 1 Reply Last reply
        0
        • J John_A._Myer

          @jsulm thank you for your fast reply.

          Just to be sure : you mean using QToolButton instead of QPushButton?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @John_A._Myer yes

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved