@onek24: You are right I didn’t notice the “some code” mention. However it is still possible to move the rectangle and the outside code to Robot.qml
@sibislaw2: Is something like below possible in your use case?
// MainWindow.qml
import QtQuick 2.1
Rectangle {
//some code
MyViewport {
}
}
// MyViewport.qml
import QtQuick 2.1
import Qt3D 2.0
Viewport {
// some 3D code
Robot{
}
}
// Robot.qml
import QtQuick 2.1
import Qt3D 2.0
Item3D {
// some 3D robot drawing code
}
↧