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. SpinBox alignment issue
Forum Updated to NodeBB v4.3 + New Features

SpinBox alignment issue

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 2 Posters 1.1k Views 2 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.
  • M Offline
    M Offline
    MTOLANI
    wrote on last edited by
    #1

    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
    0
    • M Offline
      M Offline
      MTOLANI
      wrote on last edited by
      #2

      Any idea on this one?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        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
        2
        • M Offline
          M Offline
          MTOLANI
          wrote on last edited by
          #4

          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
          0
          • M Offline
            M Offline
            MTOLANI
            wrote on last edited by
            #5

            @SGaist any idea about this?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              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
              1

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved