Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. what's difference between real keyboard and Qevent::Keypress in QDdoublepinBox
Forum Updated to NodeBB v4.3 + New Features

what's difference between real keyboard and Qevent::Keypress in QDdoublepinBox

Scheduled Pinned Locked Moved General and Desktop
virtual keyboar4.8
7 Posts 2 Posters 2.9k 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.
  • S Offline
    S Offline
    shalongbasi
    wrote on 25 Mar 2015, 20:43 last edited by shalongbasi
    #1

    Question about Qt 4.8 example project "input panel"

    I replaced first lineEdit Object in UI with QDoubleSpinBox.
    When I enter digital number from real keyboard, it shows what I entered, for example, when I enter "9", the "9" is shown in QDoubleSpinBox, after I entered second "9", it shows "99", if I enter third "9" , it shows "999"
    that's correct.

    but when I enter "9" from soft keyboard, things changed. Software keyboard generates QKeyEvent to simulate a key is pressed. when I clicked first "9", it shows "9", but after I clicked second "9", it shows "99.000". if I enter third '9", it shows "999.000". this make it difficult for me to enter "999.99", I have to select those three "000" after "." and enter "9", it will show "999.900", then I have to select last "00" and replace it with 9, This make it difficult to enter a number easily.

    Anyone knows how to prevent SpinBox appending those "0" after decimal dot? thanks for help

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 25 Mar 2015, 22:41 last edited by
      #2

      Hi,

      You should add which OS/Platform you are running on

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply 30 Mar 2015, 20:41
      0
      • S SGaist
        25 Mar 2015, 22:41

        Hi,

        You should add which OS/Platform you are running on

        S Offline
        S Offline
        shalongbasi
        wrote on 30 Mar 2015, 20:41 last edited by
        #3

        @SGaist Thanks, I just tried this on Windows 7 today and it works great. While under Ubuntu, it works like what I said before. I tried to disable QAbstractSpinBox.keyboardTracing property, it does not help. Anyone knows what causes the differece between windows & linux? thanks lot

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 30 Mar 2015, 21:17 last edited by
          #4

          Which exact version of Qt 4 are you using ? And is it self-built ? From your Linux distribution ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          S 1 Reply Last reply 31 Mar 2015, 13:29
          0
          • S SGaist
            30 Mar 2015, 21:17

            Which exact version of Qt 4 are you using ? And is it self-built ? From your Linux distribution ?

            S Offline
            S Offline
            shalongbasi
            wrote on 31 Mar 2015, 13:29 last edited by
            #5

            @SGaist It is Qt4.8.1 from linux distribution.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 31 Mar 2015, 23:49 last edited by
              #6

              Can you try with a more recent version ? Either 4.8.6 or the latest git version

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              S 1 Reply Last reply 2 Apr 2015, 21:03
              0
              • S SGaist
                31 Mar 2015, 23:49

                Can you try with a more recent version ? Either 4.8.6 or the latest git version

                S Offline
                S Offline
                shalongbasi
                wrote on 2 Apr 2015, 21:03 last edited by
                #7

                @SGaist I tried with Qt 4.8.6, same problem. :(

                1 Reply Last reply
                0

                2/7

                25 Mar 2015, 22:41

                topic:navigator.unread, 5
                • Login

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