How to Load methods dynamically using Qt..!
-
Hi,
I need to develop an application for my POS device,at first the user will select the modules that he want to use at the begining of the application the application should load with the methods or functionality that was entred as by the user requirement.
Ex:-Our Pos contains various I/O moduels such as LCD,KeyPad,Printer etc..,
At the begining of application the user enters LCD and Printer then the application should call only the methods that contians the code regarding these two modules.So please guide me how to develop the application and suggest me which Qt classes should i go through.Our Pos device works on Linux OS and the Qt version that i am using is 4.7.4.
Thanks in advance,
Rohith.G -
Sounds like you want to load some parts of your application when they are needed.
In this case you could implement those parts as shared libraries and load them manually using QLibrary (http://doc.qt.io/qt-4.8/qlibrary.html) at run-time.
Another possibility is to use Qt plug-ins: http://doc.qt.io/qt-4.8/plugins-howto.html -
Check the links I provided - there are some examples. Maybe Qt examples provide more code.