The objects which I connect directly live in the same thread. But the code is executed by a new QThread that I create. This thread acts as a realtime timer which triggers the execution of slots which emit signals and other slots and so. This object graph is defined by a custom XML at the moment. Take a look at the project's (beta) website. It might help you to understand what I am after.If your objects live in different threads then having direct connections between them is a good first step to the end of the world.
Qt is only an application framework. The OS does bring real-time guarantees. I am using clock_nanosleep() kernel instruction in my C++/Qt timer code. It works great. My realtime part is not missing deadlines on sub-microsecond basis - but only if my modules (QObjects) are connected directly. With queued connections it doesn't even make sense to measure delays as you bring an extra queue in between my modules. That's why I need direct connections.Qt does not bring any real-time guarantees. Regardless if you use direct connections or queued ones.
The Connections object is used as this. See the following example:It's as possible as exposing any other QML element. "Connections" is by no means different.
Looking at the code above I can't see any way how to impact the connection type of clicked signal. I must be missing something. Should I inherit Connections class? I don't have problem with exposing a QML element. My problem is that the notation onSignal:slot always creates queued connection.Qt Code:
Connections { target: area onClicked: foo(parameters) }To copy to clipboard, switch view to plain text mode
Bookmarks