Tag Info

New answers tagged

0

If you already have your qml file on the phone, it's pretty easy. All you have to do is to call qmlscene with an extra argument. Start a connection from your desktop/laptop with phablet-shell. Run qmlscene with --desktop_file_hint, example: $ qmlscene --desktop_file_hint=/usr/share/applications/dialer-app.desktop $HOME/Documents/myfile.qml


1

Yes, it is possible. What you need to do is create a plugin. This will allow you to import a C++ object (and only objects!) into your QML namespace. Since you want a C++ function, you'll have to make a "dummy" object with a method that just calls the C++ function you desire. To do this, you'll need to create two classes. One will be a class for that ...


0

Make sure to include the "webview" policy group in your apparmor profile. At a minimum, the apparmor JSON file should be { "policy_groups": [ "networking", "webview" ], "policy_version": 1.2 }


1

I believe what you want is a Repeater, which repeats its delegate for each item in a model. As an example: Column { spacing: units.gu(1) Repeater { model: ["one", "two", "three"] Label { text: index + ". " + modelData } } }


2

You parens aren't quite right: pageStack.push(Qt.resolvedUrl("qml/view.qml"), {code: codeValue});


0

Try making your property name a string, like this: {'code': codeValue}, otherwise Qml is likely trying to evaluate code as a variable rather than a literal.


1

Just to clarify Confinement Policy, if you want to write a file on Ubuntu Touch, in your file mytype.cpp, replace: QString filename = "text.txt"; by: QString filename = "/home/phablet/.local/share/your_app_name/text.txt";



Top 50 recent answers are included