Important: Please read the Qt Code of Conduct -

How can I add a widget to a 3D scene in C++ like we do with Image in QML?

  • I've looked at pixmap, QLabel, but couldn't make it work, here is a code snippet of what I tried, this code is not complete:

    Qt3DExtras::Qt3DWindow *view = new Qt3DExtras::Qt3DWindow();
    Qt3DCore::QEntity *rootEntity = new Qt3DCore::QEntity();
    QLabel *label = new QLabel(rootEntity);
    label->setText("some text");

    the parent object of label must be a QWidget, but I'm working with a qt3Dwindow and QEntity, how can I integrate label to the scene?

Log in to reply