Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    QDeclarativeView animation stops in release build

    Mobile and Embedded
    1
    3
    2048
    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.
    • E
      ephe last edited by

      I created a small application which just shows a spinning icon. I've created this animation in QML.

      This is what my application looks like:
      @
      MainWindow::MainWindow(QWidget parent)
      : QMainWindow(parent)
      {
      setFixedSize(600,440);
      QWidget
      poWidget = new QWidget();
      QVBoxLayout* poLayout = new QVBoxLayout();

      QDeclarativeView* view = new QDeclarativeView();
      view->setSource(QUrl("qrc:/img/SpinningIcon.qml"));
      view->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
      
      poLayout->addWidget(view);
      poWidget->setLayout(poLayout);
      setCentralWidget(poWidget);
      

      }
      @

      @
      int main(int argc, char *argv[])
      {
      QApplication a(argc, argv);
      MainWindow w;
      w.show();
      return a.exec();
      }
      @

      If I run it in debug mode on the Blaze with Windows EC7, everything works fine. If I try to run it in release mode, it stops spinning after a while and the CPU load goes up to nearly 100 %. (before it stops, the CPU load is around 20 %)

      Does anybody have an idea what the problem could be?
      Thank you in advance!

      1 Reply Last reply Reply Quote 0
      • E
        ephe last edited by

        It works when I change the settings of the QtGui project.
        When C/C++ - Optimization - Disabled is set, everything works fine.

        The other problem is that the cpu load of the release build is a lot higher than the debug build when I embed QML in C++. Without QML the cpu load is a lot lower in debug mode.

        Does anybody have an explanation for this?

        1 Reply Last reply Reply Quote 0
        • E
          ephe last edited by

          I found out that it is enough to only change the optimization settings of qblendfunctions.cpp

          But I still do not have an explanation for that :(

          1 Reply Last reply Reply Quote 0
          • First post
            Last post