Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. multiwindow scenegraph couldn't render correct
Qt 6.11 is out! See what's new in the release blog

multiwindow scenegraph couldn't render correct

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 382 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mohammad sina msh
    wrote on last edited by
    #1

    scenegraph for rendering some 2d on qtquick and qml and i load my app from c++ with this code :

        QGuiApplication app(argc, argv);
        QQmlApplicationEngine engine;
    
    #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
    #ifndef QNANO_USE_RHI
        QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
    #endif
    #endif
    
        const QUrl url(u"qrc:/NoroView/Main.qml"_qs);
        QObject::connect(&engine, &QQmlApplicationEngine::objectCreationFailed,
            &app, []() { QCoreApplication::exit(-1); },
            Qt::QueuedConnection);
    
        engine.load(url);
    
        return app.exec();
    

    and

    QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
    

    is for set graphics api for using on scene graph and its ok.
    like this photo:
    enter image description here
    but when i opened another ApplicationWindow from qml

    main window and second window that i opened gets into problem on rendering for example colors just show in green
    and text doesn't show well
    enter image description herei designed an app using

    and i think its because i cant setgraphicsapi for second window that i opened from qml with ApplicationWindow

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved