QQuickItem on top of QQuickView
-
I have a QQuickView which renders every 16 msec.
@int main(int argc, char *argv[])
{
QGuiApplication a(argc, argv);QQuickView *view = new Window; view->setMinimumSize(QSize(800,600)); view->setResizeMode(QQuickView::SizeRootObjectToView); view->setSource(QUrl("qrc:/qml/main.qml")); view->show(); return a.exec();
}@
Because of that my QML UI is not visible.
@import QtQuick 2.3
Rectangle {
id: root
Text {
anchors.fill: parent
id: text1
color: "#b40202"
text: qsTr("Loading...")
font.bold: true
font.pixelSize: 24
}
}@"Screenshot":http://postimg.org/image/t3q0w2fat/
How can I draw QML UI on top of the QQuickView?
-
From the screenshot it looks like you are also doing some OpenGL rendering (the triangle)?
Does it look correct if you don't do any OpenGL calls?
If so, maybe you are not restoring the OpenGL state after rendering?Have a look at QQuickWindow::resetOpenGLState()