Important: Please read the Qt Code of Conduct -

In full Screen The child widget is not visible

  • I have an application in qml. I am using quickview and setting it as full screen. But when I try to open a .ui file(QWidget) from full screen mode it is going behind the mainwindow. this doesn't happen when I am not in full screen mode. I have tried setting flag (Qt::WindowStaysOnTopHint) but it doesn't work. I am using QT5 . Thanks for the help.

    @QUiLoader loader;
    QFile file("abc.ui");;
    QWidget _parent = loader.load(&file);
    _parent->setWindowFlags(_parent->windowFlags() | Qt::WindowStaysOnTopHint)

    In this the mainlayout is quickview

  • can someone please help.... any suggestion is welcomed..

  • Moderators

    Can you paste more of you code ? How have you created QQuickView and how is mainlayout set for QQuickView ?

  • @// this is my main layout file
    QUiLoader loader;
    QFile file("mainLayoutFile.ui");;
    QWidget* pw = loader.load(&file);
    QMainWindow mainWindow = dynamic_cast<QMainWindow>(pw)

    //this us my main qml
    QQuickView *quickView = new QQuickView;

    QEngine *engine = quickView->engine();

    //this are for the viewports which will be inside main.qml i will create them elsewhere
    QQmlComponent ViewportComponent = new QQmlComponent(engine, "Viewport.qml");

    QWidget *quickViewWidget = QWidget::createWindowContainer(quickView, mainWindow);


Log in to reply