PDA

View Full Version : StereoView Element not a Type?



The_Schrek
16th February 2012, 19:18
Hi all together,

i am trying to program some 3D output applications for my 3D screen and i am facing some problems.
I have a simple QML Application and want to use a StereoView Element. The program compiles fine, but when i start it i get the error: "StereoView is not a type"
I am using Qt4.8 built from the new SDK and having QtQuick3D built in.

The Source Code in the qml is:


import QtQuick 1.1
import Qt 4.7
import Qt3D 1.0
import Qt3D.Shapes 1.0

StereoView{
id: stereo
width: 640; height: 450

Rectangle{
id:rect1
anchors.fill: parent

}


}

the main code is:


#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
#include <QGLFormat>
#include <qdeclarativeview3d.h>

Q_DECL_EXPORT int main(int argc, char *argv[])
{
QScopedPointer<QApplication> app(createApplication(argc, argv));

QDeclarativeView3D viewer;

QGLFormat fmt;
fmt.setAlpha(true);
fmt.setStereo(true);
fmt.setDepth(true);
fmt.setBlueBufferSize(100);
fmt.setOption(QGL::StereoBuffers);

QGLFormat::setDefaultFormat(fmt);

viewer.setSource(QUrl("qrc:/stereo.qml"));

viewer.showFullScreen();
return app->exec();
}


can anyone help me with that issue?
best
Andy