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

QPropertyAnimation doesn't work properly in Linux

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.0 RC2, 6.2.0 Alpha
    • None
    • Fedora 34 x64, Xfce 4.16, GCC 11.1.1
    • Linux/X11

    Description

      Bug reproduction:

      1. Create a new Qt Widgets project with a default QWidget or QMainWindow.

      2. Write following codes to add the fade-in effect on that default Widget:

       

      void
      MainWindow::show()
      {
          QPropertyAnimation *fadeInAnimation = new QPropertyAnimation(this, "windowOpacity");
          fadeInAnimation->setDuration(2000);
          fadeInAnimation->setStartValue(0);
          fadeInAnimation->setEndValue(1);
          fadeInAnimation->start(QAbstractAnimation::DeleteWhenStopped);
          QWidget::show();
      }
      

      3. Compile and run.

       

      I tested the same code in Microsoft Windows 10 with Qt MinGW 8.1.0 and it worked like a charm.

      However, in Linux, the problem is that the fading animation will show properly only when I keep moving mouse cursor inside the window. Otherwise, the animation will be omitted. it will just wait for 2 seconds before showing up a totally opaque window directly.

      I tested with Qt 6.2.0 Alpha and Qt 5.15.2 and this problem occurs in both of the versions.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            zxfksie Xiang Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes