Qt Forum

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

    Unsolved QSpinBox improper behaviour

    Mobile and Embedded
    4
    7
    727
    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.
    • S
      Sriu1 last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 1
        • S
          Sriu1 last edited by

          @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);

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

            @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 Reply Quote 1
            • S
              Sriu1 last edited by

              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)

              jsulm 1 Reply Last reply Reply Quote 0
              • jsulm
                jsulm Lifetime Qt Champion @Sriu1 last edited by

                @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 Reply Quote 1
                • mranger90
                  mranger90 last edited by

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