Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QDeclarativeView animation stops in release build
Forum Updated to NodeBB v4.3 + New Features

QDeclarativeView animation stops in release build

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 1 Posters 2.3k Views 1 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.
  • E Offline
    E Offline
    ephe
    wrote on last edited by
    #1

    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
    0
    • E Offline
      E Offline
      ephe
      wrote on last edited by
      #2

      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
      0
      • E Offline
        E Offline
        ephe
        wrote on last edited by
        #3

        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
        0

        • Login

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