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

Getting Warning in Every Project.



  • Dear all,
    Getting this warning in every Project How should i solve that?
    Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing.


  • Qt Champions 2019

    @Dev-Tyagi Which Qt version?
    Do you get this warning even with a fresh project created using wizard without any additional code from you?



  • @jsulm Qt Design studio 1.2.0 Based on Qt 5.12.3

    Yes ,In fresh Project also it is showing the same warning .


  • Qt Champions 2019

    @Dev-Tyagi OK, don't know what causes this warning. You can search on Internet for it, maybe you can find more. Also, you could try to update to more recent versions.



  • I don't know what causes it or how to solve it. Just find out where it comes from:

    void QSurfaceFormat::setDefaultFormat(const QSurfaceFormat &format)
    {
    #ifndef QT_NO_OPENGL
        if (qApp) {
            QOpenGLContext *globalContext = QOpenGLContext::globalShareContext();
            if (globalContext && globalContext->isValid()) {
                qWarning("Warning: Setting a new default format with a different version or profile "
                         "after the global shared context is created may cause issues with context "
                         "sharing.");
            }
        }
    #endif
        *qt_default_surface_format() = format;
    }
    

    Qt Design studio

    Isn't that just for design? So the warning is from the studio itself?

    I've never used that studio by the way, hope others can have some ideas.


Log in to reply