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

SpinBox alignment issue



  • 0_1523356552306_SpinBox.PNG

    I am using a spinBox, but the alignment is not proper

    import QtQuick 2.4
    import QtQuick.Controls 1.3
    import QtQuick.Controls.Styles 1.3
    import QtQuick.Layouts 1.0
    import "."
    
         Row {
                            SpinBox {
                                id: spinBoxSuffix
                                enabled: radioButtonSuffix.checked
                                KeyNavigation.backtab: nodeSuffix
                            }
                        }
    
    

    I tried using height, width, but the alignment is still not proper. SpinBoxStyle doesn't work as well.



  • Any idea on this one?


  • Lifetime Qt Champion

    Hi,

    You don't give enough information.

    What version of Qt ?
    What platform ?

    In your sample code, neither radioButtonSuffix nor nodeSuffix exist.



  • Hi,

    Sorry about that.
    Using QT 5.6 on Windows 10.
    If i remove those parameters, enabled and KeyNavigation.backtab, it doesn't make a difference.

    import QtQuick 2.4
    import QtQuick.Controls 1.3
    import QtQuick.Controls.Styles 1.3
    import QtQuick.Layouts 1.0
    import "."
    
    FocusScope {
    
    ColumnLayout {
    
            id: column1
            anchors.fill: parent
            anchors.margins: 10
            spacing: 10
            height: 100
    
             SpinBox {
                       id: spinBoxSuffix
             }
                
       }
    }
    
    


  • @SGaist any idea about this?


  • Lifetime Qt Champion

    Can you test that with a more recent version of Qt ? The current LTS is 5.9.5.

    I don't have a Windows machine at hand but tested on macOS with 5.10 and it's working correctly.


Log in to reply