Showing posts with label library. Show all posts
Showing posts with label library. Show all posts

Sunday, June 3, 2018

Just one library with different immplementations? d-pointer desing pattern to the rescue

I'm developing a library based on Qt to access the Sense HAT add-on for Raspberry Pi. It's based on ideas and code from Qt's experimental module and from this other library. The ultimate goal is to provide a library that can be used with either the actual hardware or the Sense Emulator without any code changes to the program using it.

QML signals to C++? No, the other way around please

While developing an application with QML and C++ please refrain to emit signals in QML that should be handled by C++ code. Just the opposite, keep QML as the UI layer and expose your C++ object to QML (as a context property or with qmlRegisterXXX) and then call a slot or a Q_INVOKABLE method of this object from QML.