Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QQuickView setSource (qml) - hide() / show()



  • Hello,

    I have a problem with QQuickView.

    If I first load a QQuickView, setSource to .qml File and call show() then everything works.

    If I hide() the QQuickView and try show() again, the qml file is not shown.

    I also tried it with setVisible(true/false), but that does not work, too.
    setSource() again does not work, too.

    Can someone help me?

    Thank you.



  • It seems same to me. I slove it use below code.
    @QQuickItem * rootItem = quickView->rootItem();
    rootItem->setFlag(QQuickItem::ItemHasContents);
    rootItem->update();@



  • Hi,

    This sounds like a bug -- I'd suggest lodging a bug report at http://bugreports.qt-project.org (preferably with a simple example) so the issue can be followed up.

    Regards,
    Michael


Log in to reply