Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Segfault trying to connect QML signal to CPP slot

$
0
0
Qt 5.2.1, visual studio 2010. In my class constructor I have the following code, and at runtime m_uiRoot is 0 at the Q_CHECK_PTR call. m_view = new QQuickView; Q_CHECK_PTR(m_view);   m_view->setSource(QUrl::fromLocalFile("ControlPanel.qml")); m_view->show();   m_uiRoot = m_view->rootObject(); Q_CHECK_PTR(m_uiRoot); //SEGFAULT HERE    connect(m_uiRoot, SIGNAL(Scene1Pessed()), this, SLOT(handleButtonClicked()));  connect(m_uiRoot, SIGNAL(Scene2Pressed()), this, SLOT(handleButtonClicked()));  connect(m_uiRoot, SIGNAL(Scene3Pressed()), this, SLOT(handleButtonClicked()));  connect(m_uiRoot, SIGNAL(Scene4Pressed()), this, SLOT(handleButtonClicked()));  connect(m_uiRoot, SIGNAL(Scene5Pressed()), this, SLOT(handleButtonClicked()));  connect(m_uiRoot, SIGNAL(Scene6Pressed()), this, SLOT(handleButtonClicked()));

Viewing all articles
Browse latest Browse all 4972

Trending Articles