Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

About QquickWidget has a black background



  • I have the same problem like's some others
    I want to show qml UI in qwidget,but follow the offical example,my project sometimes good , sometimes bad
    my code is:
    Widget::Widget(QWidget parent)
    : QWidget(parent)
    {
    childW = new ChildWidget(this);//custom quickwidget
    QHBoxLayout
    layout = new QHBoxLayout(this);
    layout->addWidget(childW);
    setLayout(layout);
    }
    the code is running OK
    but when i use the code in my complex project,the bad which is still has a black background

    What am I doing wrong?
    Or Qt has some bug in quickwidget?


Log in to reply