Forums

OverviewV-Play 1 Supportaccessing V-Play components from Qt-c++ › Reply To: accessing V-Play components from Qt-c++

OverviewV-Play 1 Supportaccessing V-Play components from Qt-c++ › Reply To: accessing V-Play components from Qt-c++
#4621

Christian
V-Play Team

Hi arkan1313,

access of Qt QML components is only possible for the public ones like QDeclarativeItem, but not for QDeclarativeImage for example as they are privately declared in Qt.

In C++, you can only create QML components from qml files, e.g. with

QDeclarativeEngine engine;
 QDeclarativeComponent component(&engine,
         QUrl::fromLocalFile("MyItem.qml"));
 QObject *object = component.create();
 ...
 delete object;

However, I cannot recommend this approach, because you loose the advantages of QML, like being faster to develop or less source code needed. Could you please explain, why the QML approach is not sufficient for your project, i.e. which functionality could not be done with QML?

Cheers, Chris

 

 

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support