Tag Info

New answers tagged

0

The problem was that the signature of QGuiApplication's constructor is actually QGuiApplication(int & argc, char ** argv)...notice that reference with argc :) I passed argc by value.


1

Try changing the following line: xhr.open("GET", "http://api.flickr.com/services/feeds/photos_public.gne?format=json&nojsoncallback=1&tags=munich"); ...to: xhr.open("GET", "http://api.flickr.com/services/feeds/photos_public.gne?format=json&nojsoncallback=1&tags=munich", true); Note the true argument given to the async parameter. There's ...


1

I was having the same problem today, however, I just discovered the solution (and what the error was specifically). The problem is the qml plugin files required are not in the currently specified include directories. If you make a new app and select App with Simple UI, there will be a file called [projectName].qmlproject in the app project root directory. ...


1

You need to install intltool in the chroot in which you're building your binaries. In Qt Creator, select Tools > Options... and choose the Ubuntu item from the list at left. Select the Click tag, and then click the Maintain button next to the appropriate build target. This will open a terminal with a root shell inside the chroot. From here, use apt-get ...


0

I was unable to reproduce your problem, but when I ran your sample, I didn't see the webview at all. It looks to me that your positioning is very confused. You have a Column containing a single Row, which contains another Column. This doesn't really make sense. It's obscured by incorrect indentation, so the first take-away is, clean up your code before ...


0

To compare with undefined you write text === undefined. This will evaluate to false if text is null. If you want check if value is present (i.e., check for both undefined and null), use it as condition in if statement or ternary operator. If you need to store result of comparison as a boolean value, use var textPresent = !!text (though double ! might appear ...


2

What I ended up doing was creating a Column and inserting a Rectangle before the content I wanted to appear in the footer: Rectangle { color: "transparent" width: parent.width height: units.gu(3) }


1

import QtQuick 2.3 import QtQuick.Controls 1.2 Button { id: myButton text: text ? text : "default text" } This answer throws a warning for me. QML Button: Binding loop detected for property "text" Changing text to modelText instead throws an error. ReferenceError: modelText is not defined This stops the Javascript execution for me; i.e. the ...


3

I'm no expert on JSONListModel so I may be mistaken, but it seems to be expecting to iterate over a list of Objects. What you get from rad.io is a list of strings, which seems to be causing your problems. But since you don't need to do any fancy processing of the result, it's easy to roll this by hand. What you want to do is parse the response into a list ...


3

Actually no data is stored in your ListModel. I suppose you are using this, from GitHub. JSONListModel is filled by using the method append(jsobject dict) from QtQuick ListModel. This method requires a role and a value to be specified, but the json data you get from rad.io contains only the values. For that reason, ListElements are added in your model, ...


0

First, you need to make your system partition writable by doing 1: touch /userdata/.writable_image and rebooting your phone/tablet. Be aware that you cannot install over-the-air (OTA) updates after doing this. Then you need to install gdb: apt-get install gdb Finally, when launching the app from Qt Creator like shown here, instead of pressing the "Run" ...


2

I'm using the ContactModel.qml available in the SDK example. To add some spacing between your footer and the last list element you can create a dedicated component for your footer and modify the layout the way you want inside it: import QtQuick 2.0 import Ubuntu.Components 0.1 Item { width: 200 height: 350 ListView { width: 180; ...



Top 50 recent answers are included