Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved SpinBox alignment issue

    QML and Qt Quick
    2
    6
    710
    Loading More Posts
    • 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.
    • M
      MTOLANI last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • M
        MTOLANI last edited by

        Any idea on this one?

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          You don't give enough information.

          What version of Qt ?
          What platform ?

          In your sample code, neither radioButtonSuffix nor nodeSuffix exist.

          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 Reply Quote 2
          • M
            MTOLANI last edited by

            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
                     }
                        
               }
            }
            
            
            1 Reply Last reply Reply Quote 0
            • M
              MTOLANI last edited by

              @SGaist any idea about this?

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                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.

                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 Reply Quote 1
                • First post
                  Last post