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

Alexander Dyagilev alervdvcw at gmail.com
Fri May 20 14:48:11 CEST 2022


Hello,

Sorry, the previous email had a wrong title. Had to fix it due to no 
answers :) So:

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/6a322fc8/attachment.htm>


More information about the Interest mailing list