Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. C++ signal QML slot with QObject as parameter but sometimes QML receives null
Forum Update on Monday, May 27th 2025

C++ signal QML slot with QObject as parameter but sometimes QML receives null

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 218 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Prasad_Socionext
    wrote on last edited by
    #1

    Hi

    I am trying to send a QObject (kind off handle of a applicationwindow where i do my plots) via a c++ signal to QML slot. but sometimes instead of receiving the QObject of Applicationwindow it receives null. I use this to grabtoimage the plot and also to close the window.
    sometimes in works but somes it does not.

    Somewhat the QObject becomes null when the signal reaches the QML.

    qDebug()<<"SAVE Routine"<<_figures.at(ii).id<<"----fig_id"<<fig_id<<_figures.at(ii).handle;
    emit signal_save(_figures.at(ii).handle, full_path,"JABBA");
    qDebug()<<"SAVE Routine"<<_figures.at(ii).id<<"----fig_id"<<fig_id<<_figures.at(ii).handle;

    result when it works
    SAVE Routine 4 ----fig_id 4 QQuickApplicationWindow(0x5e0fca70)
    SAVE Routine 4 ----fig_id 4 QQuickApplicationWindow(0x5e0fca70)
    qml: ting tong jabba
    qml: QQuickApplicationWindow(0x5e0fca70)

    Result when it does not work
    SAVE Routine 3 ----fig_id 3 QQuickApplicationWindow(0x4a1a69f0)
    SAVE Routine 3 ----fig_id 3 QQuickApplicationWindow(0x4a1a69f0)
    qml: ting tong jabba
    qml: null C:/_Migrated_QT_GUI/build-rk2_gui-Desktop_Qt_5_11_2_MinGW_32bit-Debug/rk2_logs/log_20190220_132140/Jabba_Cal/Fig-3 ADC1 Calibration I-Channel.png JABBA
    done
    qml: null 2 3

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved