Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
19 March 2015
This video presents "QInject," a dependency injection framework for C++ applications built using Qt's meta-object system. The presenter demonstrates how to move away from manual object creation and dependency wiring by leveraging Qt's reflection capabilities to automate dependency injection, similar to frameworks like Spring in Java or Guice in Google's ecosystem.
The framework uses Qt's invokable constructors, setter methods marked with "injectSetter" tags, and configurable modules to automatically create and wire object dependencies. The demonstration shows practical implementation in a rewrite of the Kadu application, where a large core class that manually creates and connects objects can be replaced with automated dependency resolution. The framework aims to simplify C++ application architecture by reducing boilerplate code and making dependencies explicit and testable.
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Learn Modern C++
Our hands-on Modern C++ training courses are designed to quickly familiarize newcomers with the language. They also update professional C++ developers on the latest changes in the language and standard library introduced in recent C++ editions.
Learn more