Название: Qt quick3d проблема
Отправлено: ZoSS от Декабрь 25, 2011, 09:35
делаю по этому уроку http://habrahabr.ru/blogs/qt_software/133126/. когда компилю qt creator пишет "Qml debugging is enabled. Only use this in a safe environment! GL graphics system is not active; cannot use 3D items" чтоделать?
Название: Re: Qt quick3d проблема
Отправлено: Ubuntu_linux от Декабрь 25, 2011, 13:59
А про файле указал QT+=opengl
Название: Re: Qt quick3d проблема
Отправлено: ZoSS от Декабрь 31, 2011, 11:46
это ж qml там нет такого файла. там всего два файла: /* File generated by Qt Creator, version 2.3.1 */
import QmlProject 1.1
Project { mainFile: "HabraHolod.qml"
/* Include .qml, .js, and image files from current directory and subdirectories */ QmlFiles { directory: "." } JavaScriptFiles { directory: "." } ImageFiles { directory: "." } /* List of plugin directories passed to QML runtime */ // importPaths: [ "../exampleplugin" ] }
и import QtQuick 1.0 import Qt3D 1.0
Rectangle { color: "black" width: 400 height: 600
Viewport { anchors.fill: parent MouseArea { anchors.fill: parent onClicked: { fullScene.openDoor(); } }
camera: Camera { id: viewCamera eye: Qt.vector3d(15,10,40) center: Qt.vector3d(-2,10,0) }
Item3D { id: fullScene function openDoor() { doorOpenAndClose.loops = 1; doorOpenAndClose.start();
ufoFlyOutAndTeleportBack.loops = 1; ufoFlyOutAndTeleportBack.start(); }
Mesh { id: refrigirator; source: "refr.3ds" } Mesh { id: ufo; source: "ufo.3ds" } Mesh { id: bottom_door; source: "door.3ds" }
Item3D { mesh: refrigirator } Item3D { mesh: ufo; transform: [ufoFlyOut]} Item3D { mesh: bottom_door; transform: [doorOpen] }
// ------------------ Transform + Animations ------------------ Rotation3D { id: doorOpen angle: 0 axis: Qt.vector3d(0, 1, 0) origin: Qt.vector3d(-3, 0, 0) }
Rotation3D { id: ufoFlyOut angle: 0 axis: Qt.vector3d(0, 3, -1) origin: Qt.vector3d(10, 0, 0) }
SequentialAnimation { id: doorOpenAndClose; NumberAnimation { target: doorOpen; property: "angle"; from: 0; to : -80.0; duration: 800; easing.type: Easing.OutBounce} NumberAnimation { target: doorOpen; property: "angle"; from: -80; to : 0.0; duration: 1200; easing.type: Easing.OutCubic} }
SequentialAnimation { id: ufoFlyOutAndTeleportBack; NumberAnimation { target: ufoFlyOut; property: "angle"; from: 0; to : 100.0; duration: 1700; easing.type: Easing.OutCurve} NumberAnimation { target: ufoFlyOut; property: "angle"; from: 100; to : 0.0; duration: 0; easing.type: Easing.OutCubic} } } } }
|