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

QOpenGLTexture::setData deprecated but replaced with what?



  • I'm getting warnings that QOpenGLTexture::setData is deprecated but I can't find any documentation that specifies what is was/is replaced with. What's up with that?


  • Moderators

    Yeah, the change is a bit hard to spot at first glance.
    Deprecated are the versions of setData that take a void* data pointer. The replacement is setData with the same signature, except it now takes const void* data pointer, so a simple cast should get rid of that warning for you.



  • Worked like a charm. Thanks for the response. Saved me some time.


Log in to reply