Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 370103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:59:08+00:00 2026-05-12T13:59:08+00:00

Like it has been written here Qt up to now has 8 specilized smart

  • 0

Like it has been written here Qt up to now has 8 specilized smart pointer classes.
It looks like it is all you will ever need.
However, in order to use any of these smart pointers your class must be derived from QObject which is not always convenient.
Is there other implementations of smart pointers in Qt which work with arbitrary classes?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T13:59:08+00:00Added an answer on May 12, 2026 at 1:59 pm

    Many Qt classes are derived from QObject, and while some of the built in smart pointer classes are related to QObject (or QSharedData), the QSharedPointer and QScopedPointer templates appear to allow pointers to anything.

    More "modern" C++ (from C++11 onwards) has useful smart pointer types: https://stackoverflow.com/a/30143936/33987.

    Beyond that, you’ll find some smart pointer templates in Boost:

    • scoped_ptr – Simple sole ownership of single objects. Noncopyable.
    • scoped_array – Simple sole ownership of arrays. Noncopyable.
    • shared_ptr – Object ownership shared among multiple pointers.
    • shared_array – Array ownership shared among multiple pointers.
    • weak_ptr – Non-owning observers of an object owned by shared_ptr.
    • intrusive_ptr – Shared ownership of objects with an embedded reference count.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's quite possible a question like this has been asked before, but I can't
Watching SO come online has been quite an education for me. I'd like to
Given that a function a_method has been defined like def a_method(arg1, arg2): pass Starting
Specifically I'd like to detect when a query has been executing for over 5
I'd like to know if it's possible to determine what inline styling has been
I want to make a dropdown menu like delicious has at this http://delicious.com/search?context=all&p=sql&lc=1 page.
I am trying to build a board game ... And looks like it has
Whats the best way to implement rollover 'buttons' like Stackoverflow has for 'Questions', 'Tags',
Is there any way to implement a URL mechanisim in asp.net like it has
Is VBA going to go away any time soon, like VB6 has? Should I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.