Quantcast
Channel: Active questions tagged qtquick2 - Stack Overflow
Viewing all articles
Browse latest Browse all 107

Access c++ methods from c++ qml extension

$
0
0

I successfully set up a qml plugin with the c++ QML Extension System. For that I followed the "Writing QML Extensions with C++" Example from QT. Now to my question. Assume you want to realize a dynamic list of lets say names that are read from a database. The groundlying C++ class is called NamesList.cpp and instantiates NameListElement.cpp through a method like AddNewListElement(QString name, int id)

How could I access this AddNewListElement(QString name, int id) method from the plugin within my main application which uses the List-Plugin?

A simple "include namelist.dll" or similar does not work and unfortunately I found absolutely nothing about how to access plugin C++ methods from the application on my websearch.

Please be sorry with me if I forget a striking point of QT here but I am really new to both c++ and especially QT (Quick).


Viewing all articles
Browse latest Browse all 107

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>