Seb
Seb

Reputation: 3213

Issue when connecting signal to slots in Qt

I have developed an app in Qt/C++. I have added a thread to manage android device access and another thread for the UI management.

When running the app, I am sending different signals and receiving slots.

For some of them, I face an issue with the error below at runtime:

QObject::connect: Cannot queue arguments of type 'uint32_t'
(Make sure 'uint32_t' is registered using qRegisterMetaType().)

What should I do? Is it necessary to make any changes in all classes or in main.cpp?

Upvotes: 1

Views: 851

Answers (1)

Toby Speight
Toby Speight

Reputation: 30709

The easiest approach is to use quint32 instead of uint32_t in the arguments of your signals and slots. quint32 is pre-registered in the meta-type system for you.

Upvotes: 1

Related Questions