Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Button bug. Why the button width is truncated.



  • 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



  • 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: "Создать"
                }
    

Log in to reply