Qt Signal Slot Parameter Reference

4/11/2022by admin
  1. Qt Signal Parameter
  2. Qt Signal Slot Parameter Reference Chart
  3. Qt Slot Parameter
  • Status:Closed
  • Resolution: Duplicate
  • Fix Version/s:5.12.4
  • Labels:
  • Environment:
    Developing on Ubuntu and crosscompiling for Raspberry Pi 3.
Signal

Even if the sender of the signal and the receiver of the slot are in different threads, we should still pass arguments by const reference. Qt takes care of copying the arguments, before they cross the thread boundaries – and everything is fine. The Meta-Object Compiler, moc, is the program that handles Qt's C extensions. The moc tool reads a C header file. If it finds one or more class declarations that contain the QOBJECT macro, it produces a C source file containing the meta-object code for those classes. Among other things, meta-object code is required for the signals and slots mechanism, the run-time type information,.

Hi all,

I am sending signals from C++ and receive them in slots in QML. I am sending to parameters with these signals. Now I get a reference error, that is telling me that this variable (parameter of my signal) is not defined.

Here is a minimal example to demonstrate the problem:

When I start the application out of Qt Creator via 'Start debugging' the rectangle keeps blue and I get the error 'ReferenceError: name is not defined'.
If I start the application via 'Run' the rectangle gets red and I get no errors.

I am using Qt5.12.3. (Before I used Qt5.9.)
I am developing on Ubuntu and crosscompiling for Raspberry Pi 3.

I was confirmed that this problem also exists with other platforms. But always in connection with Qt5.12.3.

Does anyone how to solve or workaround this problem?

duplicates

QTBUG-75393[REG: 5.12.2->5.12.3]: When using Connections inside QML and a debugger is attached then it will fail at runtime to access named signal arguments

Signal
  • Closed

Gerrit Reviews

Qt signal slot parameter reference tool

Qt Signal Parameter

No reviews matched the request. Check your Options in the drop-down menu of this sections header.
Reference

Qt Signal Slot Parameter Reference Chart

Qt Signal Slot Parameter Reference
Assignee:
Qt Quick and Widgets Team
Reporter:
melle87

Qt Slot Parameter

Votes:
2Vote for this issue
Watchers:
5Start watching this issue
Comments are closed.