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. Button bug. Why the button width is truncated.
Forum Updated to NodeBB v4.3 + New Features

Button bug. Why the button width is truncated.

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 215 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
    Alexander Kharlamov
    wrote on last edited by Alexander Kharlamov
    #1

    Please look at the following simple code snippet given for example. It is a part of a larger project.

    import QtQuick
    import QtQuick.Controls
    import QtQuick.Layouts
    
    Window{
        visible: true
        width: 300
        height: 300
            RowLayout{
                Button{
                    id: create
                    text: "Создать"
                }
                Button{
                    id: cancel
                    text: "Отменить"
                }
            }
    
    }
    

    I run the project and get the buttons bug
    769c511e-bee0-4940-9a6f-f6e62bbeec05-image.png
    I can't imagine why the buttons are displayed this way. At the same time this code in a clean environment(a new project having nothing except the snippet) produces the expected result.
    3bdc9c0e-2ad5-4783-aa8b-5acc4bbb69b3-image.png

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Alexander Kharlamov
      wrote on last edited by
      #2

      Thanks all. I have just played with the buttons and reverted changes. I don't know where was the problem

      Button{
                      Layout.minimumWidth: availableWidth
                      id: create
                      text: "Создать"
                  }
      
      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