Qt smart pointer equivalent to Boost :: shared_ptr?

I used Boost::shared_ptr in my previous projects and now I want to find a smart pointer in Qt that does the same / similar thing. Since there are many classes of smart pointers in Qt, I was wondering which one to use. Is this QSharedPointer ?

+4
source share
3 answers

Do you want QSharedPointer . You will find a comparison of all the pointer classes offered by Qt in the detailed description of QSharedPointer .

+5
source

If you used boost::shared_ptr , continue to use it. Prefer boost::shared_ptr for any Qt 'extensions, because boost::shared_ptr accepted in the C ++ 0x standard ( std::shared_ptr ).

+9
source

Qt has many different smart pointers described in a blog post . QSharedPointer is most likely what you are looking for.

+4
source

All Articles