Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.1.0 Beta3
-
None
Description
Connecting a QML signal to a C++ signal/slot works in Qt 5.15.2, but it does not work in Qt 6.1.0 beta 3.
I'm connecting a QML signal to C++ using the following code
QuickButton::QuickButton(const QUrl &url, QWidget *parent) : QAbstractButton(parent) { QVBoxLayout *layout; layout = new QVBoxLayout(this); layout->setSpacing(0); layout->setContentsMargins(0, 0, 0, 0); QQuickWidget *widget = new QQuickWidget(url, this); widget->setResizeMode(QQuickWidget::SizeRootObjectToView); layout->addWidget(widget); connect(widget->rootObject(), SIGNAL(clicked()), this, SIGNAL(clicked())); widget->rootObject()->dumpObjectInfo(); }
On both Qt 5.15.2 and Qt 6.1.0 beta 3, the output from dumpObjectInfo() is
OBJECT ConnectionStatusButton_QMLTYPE_0::unnamed SIGNALS OUT signal: clicked() --> QuickButton::unnamed clicked() SIGNALS IN <None>
However the signal is not received by C++ when using Qt 6.1.0 beta 3.