Results 1 to 2 of 2

Thread: QSharedPointer casting

  1. #1
    Join Date
    Oct 2014
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default QSharedPointer casting

    anybody have experience with QSharedPointerI'm trying to use qSharedPointerDynamicCast() to check and see if a sharedpointer is a certain type,
    but I cant get any kind of casting to work on QSharedPointer

    what is the correct syntax for a dynamic_cast on QSharedPointer?
    Last edited by oldkentuckymark; 10th October 2014 at 05:35. Reason: updated contents

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QSharedPointer casting

    Qt Code:
    1. QSharedPointer<SubType> subPtr = ptr.dynamic_cast<SubType>();
    To copy to clipboard, switch view to plain text mode 
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 2
    Last Post: 18th February 2014, 10:29
  2. Replies: 11
    Last Post: 20th November 2012, 22:18
  3. QSharedPointer / QWeakPointer in QML?
    By centipede in forum Qt Quick
    Replies: 1
    Last Post: 23rd May 2012, 09:25
  4. emitting QSharedPointer
    By babu198649 in forum Newbie
    Replies: 11
    Last Post: 26th July 2010, 08:51
  5. Problem with QSharedPointer
    By weaver4 in forum Newbie
    Replies: 2
    Last Post: 19th April 2010, 14:22

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.