Problem with QObjectPicker and Qt 5.9



  • Hi everyone,

    First time posting. Please forgive my mistakes.

    Until last week, I was using Qt 5.8. In a function I had this code:

    Qt3DRender::QObjectPicker *picker1 = new Qt3DRender::QObjectPicker(m_planetEarth);
    picker1->setHoverEnabled(false);
    picker1->setEnabled(true);
    connect(picker1, &Qt3DRender::QObjectPicker::pressed, this, &Q3DMapWidget::onPressed);
    connect(picker1, &Qt3DRender::QObjectPicker::released, this, &Q3DMapWidget::onReleased);
    m_planetEarth->addComponent(picker1);
    

    It worked fine, and I was able to control my entity with the picker.

    Three days ago I updated to 5.9, and the slots are not working anymore. I try to press on the picker object but there's no response.

    Any ideas?

    Thanks everyone in advance for your time and help.


  • Moderators

    @gonssoruiz Do you mean the slots are not called? Did you verify connect() succeeded? Like

    qDebug() << connect(picker1, &Qt3DRender::QObjectPicker::pressed, this,
    &Q3DMapWidget::onPressed);
    


  • @jsulm said in Problem with QObjectPicker and Qt 5.9:

    qDebug

    Hi,

    Yes, it shows true.

    The problem revealed itself when I changed from 5.8 to 5.9.

    Thanks anyway.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.