Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QSpinBox improper behaviour
QtWS25 Last Chance

QSpinBox improper behaviour

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 4 Posters 1.2k 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.
  • S Offline
    S Offline
    Sriu1
    wrote on last edited by
    #1

    I have set a range for spinbox 10 to 50,and when 2 is entered in the spinBox and cursor is moved its setting to 22,12 ,...random values.What could be the reason?

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

      Hi,

      Please show a sample code the exhibit this behaviour.

      What version of Qt are you using ?
      On what platform ?

      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
      • S Offline
        S Offline
        Sriu1
        wrote on last edited by
        #3

        @SGaist My Qt version
        Based on Qt 5.9.3 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)

        My code is below
        ui->font_size_spinBox->setRange(10,50);

        SGaistS 1 Reply Last reply
        0
        • S Sriu1

          @SGaist My Qt version
          Based on Qt 5.9.3 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)

          My code is below
          ui->font_size_spinBox->setRange(10,50);

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Sriu1 said in QSpinBox improper behaviour:

          Based on Qt 5.9.3 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)

          That sounds rather like the Qt version used to build Qt Creator, not the one you are currently using.

          Your code is way to short to reproduce the behaviour.
          You also didn't state what flavour of Linux you are using.

          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
          • S Offline
            S Offline
            Sriu1
            wrote on last edited by
            #5

            My linux version is 16.04LTS.I'm currently working on Qt creator Based on Qt 5.9.3 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)

            jsulmJ 1 Reply Last reply
            0
            • S Sriu1

              My linux version is 16.04LTS.I'm currently working on Qt creator Based on Qt 5.9.3 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Sriu1 said in QSpinBox improper behaviour:

              Qt creator Based on Qt 5.9.3 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)

              Again: this is Qt version which was used to build QtCreator. Which Qt version did you install? You can check it in your Kit settings.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • mranger90M Offline
                mranger90M Offline
                mranger90
                wrote on last edited by
                #7

                Are you sure that the result is really a random value ?
                The spin box range is [10, 50], entering a 2 and moving the cursor results in an out of range value which usually results in the spin box going back to the previous value.

                1 Reply Last reply
                2

                • Login

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