[Interest] Qt6: QShared<const TYPE> is not supported in signals if TYPE is an QObject?

Alexander Dyagilev alervdvcw at gmail.com
Fri May 20 10:54:43 CEST 2022


Hello,

Qt5 - compiles and works fine.

Qt6 - can't even compile. Windows, MSVC2019.

Code:

*a.h*:

classA:publicQObject

{

Q_OBJECT

public:

explicitA(QObject*parent=nullptr);

signals:

voidtest1(constQSharedPointer<constC>&o);//OK

voidtest2(constQSharedPointer<constB>&o);//CompileerrorunderQt6

};

*b.h*:

classB:publicQObject

{

Q_OBJECT

public:

explicitB(QObject*parent=nullptr);

};

*c.h*:

classC

{

public:

C();

};

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220520/13d9b7fb/attachment.htm>


More information about the Interest mailing list