Important: Please read the Qt Code of Conduct -

Is it possible to use qDeclarativeView in QtQuick 2.0

  • If I write in .pro File Qt += quick and #include <QtQuick> i can not use QDeclarativieView, only QQuickView.
    But I need QDeclarativeView so I allready tried to #include <QtQuick1/QDeclarativeview> but then i get an error with redefinition.

    Anyone knows a solution for this problem, to use QtQuick 2.0 and QDeclarativeView?

    Thank you.

  • Do you use Qt5 or Qt4?

  • Qt5.

  • It is <code>QT += quick1</code> then, not <code>QT += quick</code>.

  • If I only write Qt += quick1 in the .pro File, then QDeclarativeView works.
    But the I get an Error by using QtQuick 2.0.

    plugin cannot be loaded for module "QtQuick": Unknown error import QtQuick 2.0.

  • Don't use QDeclarativeView if you need to load QtQuick 2.0 components. Use QQuickView. Why do you think you need to use QDeclarativeView, out of interest?

  • I need QDeclarativeView because of performance.

    I use Qt 5 on Ubuntu with VMware Player and when i start the application with QDeclarativeView then everything is okay.
    When I use QQuickView it works but the application is very slow.

  • Ah, I see. QtQuick2 requires opengl, and doesn't directly use a software rasteriser. I imagine that VMware Player provides opengl support via a software pipeline with greatly reduced performance, which could result in the performance problems you are seeing. I'm not 100% certain, of course.

Log in to reply