Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt 5.12 quick controls 2 button height problem
Forum Updated to NodeBB v4.3 + New Features

Qt 5.12 quick controls 2 button height problem

Scheduled Pinned Locked Moved Solved QML and Qt Quick
7 Posts 2 Posters 407 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.
  • MohsenNzM Offline
    MohsenNzM Offline
    MohsenNz
    wrote on last edited by
    #1

    Hi guys. My application buttons have not correct height in Qt 5.12,
    while they are fine in Qt 5.11.
    Screenshot from 2019-10-23 14-41-52.png
    On this image , delete buttons should be rectangle.
    Screenshot from 2019-10-23 14-42-10.png
    In this one , the width and height of the button are the same ( 56)

    1 Reply Last reply
    0
    • IntruderExcluderI Offline
      IntruderExcluderI Offline
      IntruderExcluder
      wrote on last edited by
      #2

      If you are using controls not from Templates there can be default paddings. Set padding: 0 to remove them.

      1 Reply Last reply
      0
      • MohsenNzM Offline
        MohsenNzM Offline
        MohsenNz
        wrote on last edited by
        #3

        Not worked.

        1 Reply Last reply
        0
        • IntruderExcluderI Offline
          IntruderExcluderI Offline
          IntruderExcluder
          wrote on last edited by
          #4

          Post source of your button then.

          MohsenNzM 1 Reply Last reply
          0
          • IntruderExcluderI IntruderExcluder

            Post source of your button then.

            MohsenNzM Offline
            MohsenNzM Offline
            MohsenNz
            wrote on last edited by MohsenNz
            #5

            @IntruderExcluder
            https://paste.ubuntu.com/p/kWvM7dH3Qy/
            it's a simple example
            Screenshot from 2019-10-24 16-45-49.png
            In this picture the height and width of the button is 30.

            Important NOTE: It just happen on Material style.

            1 Reply Last reply
            0
            • IntruderExcluderI Offline
              IntruderExcluderI Offline
              IntruderExcluder
              wrote on last edited by IntruderExcluder
              #6

              Instead of padding in material style used inset. Set this to fix your problem:

                      topInset: 0
                      bottomInset: 0
              
              MohsenNzM 1 Reply Last reply
              1
              • IntruderExcluderI IntruderExcluder

                Instead of padding in material style used inset. Set this to fix your problem:

                        topInset: 0
                        bottomInset: 0
                
                MohsenNzM Offline
                MohsenNzM Offline
                MohsenNz
                wrote on last edited by
                #7

                @IntruderExcluder
                It worked.
                Thank you man. I love u.

                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