Hello friends,

I am a little bit confused about the structure of an qml app.

How can I export QObject to my app written in qml:

Qt Code:
  1. import QtQuick 2.1
  2. import QtQuick.Controls 1.0
  3. import QtQuick.Layouts 1.0
  4. import QtQuick.Window 2.0
  5.  
  6. ApplicationWindow {
  7. width: 640
  8. height: 480
  9.  
  10. menuBar: MenuBar {
  11. Menu {
  12. title: qsTr("File")
  13. MenuItem {
  14. text: qsTr("Exit")
  15. onTriggered: Qt.quit();
  16. }
  17. }
  18. }
  19. statusBar: StatusBar{
  20. Text{
  21. anchors.centerIn: parent
  22. text: "Ready"
  23. font.family: "Verdana"
  24. }
  25. }
  26. }
To copy to clipboard, switch view to plain text mode 

The Problem is I cannot imagine how to register my new qobject type without a main.cpp!
Could anybody provide an example project with exporting new c++ types to an app written with
Qt Code:
  1. ApplicationWindow {}
To copy to clipboard, switch view to plain text mode 

Yours,