May 14, 2012

Deleted Member # 1dcaf Deleted Member # 1dcaf
Lab Rat
22 posts

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.

7 replies

May 14, 2012

Lukas Geyer Lukas Geyer
Lab Rat
2068 posts

Do you use Qt5 or Qt4?

May 14, 2012

Deleted Member # 1dcaf Deleted Member # 1dcaf
Lab Rat
22 posts

Qt5.

May 15, 2012

Lukas Geyer Lukas Geyer
Lab Rat
2068 posts

It is QT += quick1 then, not QT += quick.

May 15, 2012

Deleted Member # 1dcaf Deleted Member # 1dcaf
Lab Rat
22 posts

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.

May 15, 2012

chriadam chriadam
Lab Rat
178 posts

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?

May 15, 2012

Deleted Member # 1dcaf Deleted Member # 1dcaf
Lab Rat
22 posts

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.

May 16, 2012

chriadam chriadam
Lab Rat
178 posts

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.

 
  ‹‹ Set Software Rendering with Qt Quick 2      Simulating touchevents for QML ››

You must log in to post a reply. Not a member yet? Register here!