qml

QtQml installation in Raspberry pi

瘦欲@ 提交于 2020-01-15 10:13:11
问题 I am stuck with one error while building PyQt5 for rasberry pi. I was successfully able to run the application which uses QQmlApplicationEngine on Windows Desktop. Now I wanted to run the same application in Raspberry pi 3. I build the PyQt5 (5.4.1v) from the source and tried running the application but I get error: ImportError: No Module Found "PyQt5.QtQml". I realized that, when I build the PyQt5 from the source, I get: Project Error: Unknown module(s) in QT: qml and shows me a list of

How to find all visible deeply nested ListView items?

浪子不回头ぞ 提交于 2020-01-15 09:53:34
问题 Im working on a squish based test and try to get decent (visible) items from a QML ListView that are deeply nested that i just can't pick due to its dynamic behavior I've get the list itself by using waitForObject with a object map name There are several nested items in the list an i want to get all occurrences of the MyTypeCCC_QMLTYPE_72 when property visible is true I've dumped my current class/property child-hierachy: MyTypeAAA_QMLTYPE_195 children[0] QQuickItem children[0] QQuickColumn

How to delete QML object

别说谁变了你拦得住时间么 提交于 2020-01-15 08:47:06
问题 I am trying to delete QML object and recreate object like this: Rectangle{ property var obj signal videoStopped(variant complete) function recreate(url){ if(!obj){ console.log("createObject") obj = videoComponet.createObject(root) obj.stopped.connect(function(){ videoStopped(obj.status == MediaPlayer.EndOfMedia) }) } obj.source = url obj.play() } function stop(){ obj.destroy() // obj.deleteLater() } Component{ id: videoComponet Video { anchors.fill: parent visible: true autoPlay: true;

Qt5 and QML: How to automatically input username and password using WebEngine Quick Nano Browser

二次信任 提交于 2020-01-15 08:23:10
问题 I am writing a small application using Qt and QML that uses the example in the Qt documentation WebEngine Quick Nano Browser. In this example I am trying to access to my email. I can do it, but I am trying to enter username and password automatically so that I can instantly log into my emails. Basically as an example, after launching the application (my email address is hard-coded) I can see the username page of gmail , but here I have to type my username to access to the next page that has

Qt5 and QML: How to automatically input username and password using WebEngine Quick Nano Browser

半世苍凉 提交于 2020-01-15 08:22:07
问题 I am writing a small application using Qt and QML that uses the example in the Qt documentation WebEngine Quick Nano Browser. In this example I am trying to access to my email. I can do it, but I am trying to enter username and password automatically so that I can instantly log into my emails. Basically as an example, after launching the application (my email address is hard-coded) I can see the username page of gmail , but here I have to type my username to access to the next page that has

detect when mouse cursor is over an irregular shape picture in Qt5 and QML

社会主义新天地 提交于 2020-01-15 06:18:09
问题 I'm developing a little application with Qt5 and QML (QtCreator and C++). I would like to display a map with countries and when user passes the mouse over a country I would like to change the color of the country, thought it would be easy, and it is if all countries were rectangles. Image { id: mycountry width: 250 height: 250 source: "images/myCountry_gray.png" MouseArea { anchors.fill: parent hoverEnabled : true onEntered: { region.source = "images/myCountry_red.png" } onExited: { region

QML creating Text element takes long time

这一生的挚爱 提交于 2020-01-14 14:19:08
问题 I noticed that creating Text element in QML takes long time. For an example: import QtQuick 2.5 import QtQuick.Window 2.2 Window { visible: true width: 320 height: 640 color: "yellow" ListView { anchors.fill: parent model: 1000 delegate: Component { Rectangle { width: parent.width height: 50 color: index % 2 == 0 ? "#eee" : "#ddd" Text { anchors.fill: parent font { family: "Helvetica"; pixelSize: 15 } verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter text: "9" } } }

I want to set a Qt QML Combobox to a PyQt5 object property

*爱你&永不变心* 提交于 2020-01-14 09:32:31
问题 I am writing a small program which uses Qt5 QML as the GUI layer and Python3-PyQt5 to implement the data model. I now want to display a ComboBox in QML and set its model to a list of enums. How would I export the enum as a property of the python class so that I can reference it in QML? Preferably I would write this in QML: ComboBox { model: mymodel.car_manufacturers onCurrentIndexChanged: mymodel.selected_manufacturer = currentIndex } 回答1: Here is my solution which works good enough for me.

I want to set a Qt QML Combobox to a PyQt5 object property

╄→尐↘猪︶ㄣ 提交于 2020-01-14 09:32:28
问题 I am writing a small program which uses Qt5 QML as the GUI layer and Python3-PyQt5 to implement the data model. I now want to display a ComboBox in QML and set its model to a list of enums. How would I export the enum as a property of the python class so that I can reference it in QML? Preferably I would write this in QML: ComboBox { model: mymodel.car_manufacturers onCurrentIndexChanged: mymodel.selected_manufacturer = currentIndex } 回答1: Here is my solution which works good enough for me.

I want to set a Qt QML Combobox to a PyQt5 object property

怎甘沉沦 提交于 2020-01-14 09:32:08
问题 I am writing a small program which uses Qt5 QML as the GUI layer and Python3-PyQt5 to implement the data model. I now want to display a ComboBox in QML and set its model to a list of enums. How would I export the enum as a property of the python class so that I can reference it in QML? Preferably I would write this in QML: ComboBox { model: mymodel.car_manufacturers onCurrentIndexChanged: mymodel.selected_manufacturer = currentIndex } 回答1: Here is my solution which works good enough for me.