python - "Module "QtQuick" version 2.7 is not installed" Error on Raspberry Pi -


i attempting develop gui python code have written insulin pump. i've been using qt quick seems easiest beginner (it doesn't need super fancy, needs work). although qml script runs fine when try run on computer, when attempt run on raspberry pi, returns error qtquick not installed. i've tried installing of relevant dependencies, nothing clear error message. script i'm using run follows:

import sys pyqt5.qtwidgets import qapplication, qmainwindow pyqt5.qtcore import qurl pyqt5.qtquick import qquickview   if __name__ == "__main__":      app = qapplication(sys.argv)      view = qquickview()     view.setsource(qurl('mainform.ui.qml'))     view.show()      sys.exit(app.exec_())     app = qapplication(sys.argv)      view = qquickview()     view.setsource(qurl('mainform.ui.qml'))     view.show()      sys.exit(app.exec_()) 

my qtquick code this.

import qtquick 2.7 import qtquick.controls 2.2 import qtquick.extras 1.4  rectangle {     property alias mousearea: mousearea      width: 360     height: 360     property alias button2: button2      mousearea {         id: mousearea         enabled: true         anchors.rightmargin: 0         anchors.bottommargin: 0         anchors.leftmargin: 0         anchors.topmargin: 0         anchors.fill: parent           button {             id: button             x: 40             y: 208             width: 68             height: 28             text: qstr("basal")             font.pixelsize: 13             font.capitalization: font.capitalize             enabled: true             visible: true             opacity: 0.5             spacing: -22         }          button {             id: button1             x: 253             y: 208             width: 68             height: 28             text: qstr("bolus")         }           button {             id: button2             x: 130             y: 145             text: qstr("status")             font.bold: true             font.pointsize: 20         }          button {             id: button3             x: 145             y: 208             width: 71             height: 28             text: qstr("settings")             autoexclusive: true         }          image {             id: image             x: 12             y: 38             width: 336             height: 75             source: "../downloads/pump logo.jpg"         }     } } 

so, think need differently?

also, after error message worked out, wondering: how integrate existing python functions qtquick code? want have user press button, gui change new window , specified function run, output being printed new screen. apologies if dumb question, i'm high schooler , no 1 know knows how code. thank in advance!


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -