Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-86483

QDoubleSpinBox and QSpinBox valueChanged called twice

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.15.0, 5.15.0 RC2
    • Fix Version/s: 5.15.2
    • Component/s: Core: Event loop
    • Labels:
      None
    • Platform/s:
      Linux/X11, Windows
    • Commits:
      3bb871bdd5bbe1d3d2412b1e786a3f63fd9a4f9e (qt/tqtc-qtbase/tqtc/android_automotive-5.15)

      Description

      If I do something slowly action (>500 ms) in valueChanged or textChanged, when I clicked up-down button one time, this slot will call twice, and SpinBox jumps twice the step value too.

      void MainWindow::on_doubleSpinBox_valueChanged(double arg1) 
      { 
          Sleep(600); 
          qDebug()<<"called..."; 
      }
      

      But if I delete Sleep(600);, this slot will only call one time.

      void MainWindow::on_doubleSpinBox_valueChanged(double arg1) 
      { 
          qDebug()<<"called..."; 
      }
      

       
      I build it in Win32/Release.

        Attachments

        1. Demo.zip
          5 kB
        2. qtbug86483_stack.txt
          17 kB
        3. qtbug86483.zip
          5 kB
        For Gerrit Dashboard: QTBUG-86483
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            richard Richard Moe Gustavsen
            Reporter:
            peiqi.liu Peiqi Liu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes