android - QML application displays black screen -


i beginner in qml dont think doing in project still getting black screen when run application on android device.

main.qml

import qtquick 2.6 import qtquick.window 2.2  rectangle {     visible: true     width: 640     height: 480      mousearea {         anchors.fill: parent         onclicked: {             qt.quit()         }     }      text {         text: qstr("hello world")         anchors.centerin: parent     } } 

button .qml

import qtquick 2.0  rectangle {     id: mainbtn     property alias text: lable.text     width: 165     height: 50     radius: 2     border.width: 2     text {         id: lable         font.bold: true         font.pointsize: 17         width: parent.width         wrapmode: text.wordwrap         horizontalalignment: text.alignhcenter         anchors.centerin: parent     }     mousearea {         anchors.fill: parent         onclicked: {             console.log("1")         }     } } 

try use applicationwindow root component

import qtquick 2.3 import qtquick.window 2.2 applicationwindow {     title: qstr("myapp")     ractangle {         anchors.fill: parent         color: “yellow”     } } 

Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -