Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-2007

QPointer does not work with virtual inherited QObject

    XMLWordPrintable

Details

    Description

      Below example fails at compilation "cannot convert from 'QObject *' to 'C *' but it would be nice to make it work

      #include <QObject>
      #include <QPointer>

      class A : virtual public QObject {
      };

      class B : virtual public QObject {
      };

      class C : public A, B {
      };

      QPointer<C> ptr;
      C* foo = ptr;

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            stormols Marius Storm-Olsen
            admin Administrator
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes