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. buttons of different sizes
Forum Updated to NodeBB v4.3 + New Features

buttons of different sizes

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 322 Views 2 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.
  • I Offline
    I Offline
    IknowQT
    wrote on last edited by
    #1

    7246bd86-5d5f-4b5c-8998-21329daf48c4-image.png

    I want to lower the setting button, what can I do?
    The background color is pink. There are buttons in the grid layout, and the size of each button is different. I want to narrow the gap in the red section.

    1 Reply Last reply
    0
    • I IknowQT

      @SGaist

      this->ui.pBtn_Incubate	->setFixedSize(nBtnsizeWidth, nBtnsizeHeight);
      his->ui.pBtn_Settings	->setFixedSize(nBtnsizeWidth, nBtnsizeHeight - 10);
      

      I just changed the size of the button, so I gave you a minus 10 button sizes different.
      I want to put the set button on the bottom.

      472d605f-62c7-4679-b143-1a8cfaa52c99-image.png

      Thank YouT Offline
      Thank YouT Offline
      Thank You
      wrote on last edited by
      #5

      @IknowQT

      You can use any type of techniques to do frontend.
      Another option is

      Using spacer and using maximum width

      screenshot.jpg
      See on the properties panel on vertical policy
      As I said there are many other techniques to obtain same type of design.

      screenshotf.jpg

      This one is output

      Let's make QT free or It will go forever

      TRUE AND FALSE <3

      1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        You should provide a minimal code sample that shows what you are trying to accomplish.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        I 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          You should provide a minimal code sample that shows what you are trying to accomplish.

          I Offline
          I Offline
          IknowQT
          wrote on last edited by
          #3

          @SGaist

          this->ui.pBtn_Incubate	->setFixedSize(nBtnsizeWidth, nBtnsizeHeight);
          his->ui.pBtn_Settings	->setFixedSize(nBtnsizeWidth, nBtnsizeHeight - 10);
          

          I just changed the size of the button, so I gave you a minus 10 button sizes different.
          I want to put the set button on the bottom.

          472d605f-62c7-4679-b143-1a8cfaa52c99-image.png

          Thank YouT 1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            Which layout class are you using ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • I IknowQT

              @SGaist

              this->ui.pBtn_Incubate	->setFixedSize(nBtnsizeWidth, nBtnsizeHeight);
              his->ui.pBtn_Settings	->setFixedSize(nBtnsizeWidth, nBtnsizeHeight - 10);
              

              I just changed the size of the button, so I gave you a minus 10 button sizes different.
              I want to put the set button on the bottom.

              472d605f-62c7-4679-b143-1a8cfaa52c99-image.png

              Thank YouT Offline
              Thank YouT Offline
              Thank You
              wrote on last edited by
              #5

              @IknowQT

              You can use any type of techniques to do frontend.
              Another option is

              Using spacer and using maximum width

              screenshot.jpg
              See on the properties panel on vertical policy
              As I said there are many other techniques to obtain same type of design.

              screenshotf.jpg

              This one is output

              Let's make QT free or It will go forever

              TRUE AND FALSE <3

              1 Reply Last reply
              1

              • Login

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