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

d_ptr



  • Hi
    I want to implement the d_ptr pattern in my classes
    Is it OK to use the Q_DECLARE_PRIVATE macro as I believe it is undocumented and private to Qt

    Thanks for your time


  • Moderators

    Hi,

    @GrahamL said:

    I want to implement the d_ptr pattern in my classes
    Is it OK to use the Q_DECLARE_PRIVATE macro as I believe it is undocumented and private to Qt

    It is best not to use private things from Qt, because they might change between versions.

    You don't need that macro to implement your own d-pointers.


Log in to reply