Tag Info

New answers tagged

2

toolbaritems has been deprecated in Ubuntu.Components 1.1, so its use is strongly discouraged. It is maintained for backward compatibility, but the right way to add items to the header toolbar is now using head.actions. The main difference between head.actions and toolbaritems is that you don't need anymore to add ToolbarButton items and then set their ...


2

The snippet of code in your question does not work for me. I wrote a minimal example: import QtQuick 2.0 import Ubuntu.Components 0.1 MainView { width: units.gu(48) height: units.gu(60) id: mainView Rectangle { height: visible ? 20; width: 20; } } And qmlscene reports the following error: qmlscene ./foo.qml ...


3

Ubuntu SDK promises to maintain backwards compatibility. As far as I can remember Ubuntu Components 1.1 was created with the introduction of new widgets like combo box, additional API changes, some performance tweaks etc. Core Apps are the first wave of consumers of the Ubuntu SDK followed by other 3rd party. I personally feel that we should be striving to ...


1

Applications should not rely on knowledge about the actual positioning provider but instead rely on the accuracy estimates provided with individual position updates (see http://developer.ubuntu.com/api/qml/sdk-14.10/QtLocation.Position/#horizontalAccuracy-prop). With that, application developers do not need to worry about specific characteristics of ...


0

I think what you need is the ListItem.Expandable SDK component. It was added in the 14.10 SDK Framework which is at the time of writing this answer is a development framework. It provides the capability to collapse and expand the listitem on clicking it. I would recommend you read the API documentation here to learn more about the component and see how to ...


1

I think it did not work for you due to GPS not being enabled on the device. The following code sample worked without segfaulting on my laptop. On the device, it takes about 1-2 mins to get the GPS lock since AGPS hasn't landed yet. import QtQuick 2.2 import Ubuntu.Components 1.1. import QtPositioning 5.2 MainView { id: mainView applicationName: ...


2

It is quite simple to do the above. To set automatic focus to the TextField component, you can call forceActiveFocus() from within your TextField component as shown below, Component.onCompleted: { forceActiveFocus() } This sets the focus to the textfield immediately after it is loaded. As for showing the numpad, you can do so by setting the input ...


2

You can make a Flickable scroll to a specific point by setting the contentY property of a Flickable. Quoting the official documentation from qt-project.org, ContentY holds the surface coordinate currently at the top-left corner of the Flickable. For example, if you flick an image up 100 pixels, contentY will be 100. So if you want to scroll a ...


1

This is because you are running an out of date version of the Ubuntu SDK. The Ubuntu SDK is no longer updated on Ubuntu 14.04 (Trusty) even if you have added the SDK PPA. This is because the Ubuntu SDK requires Qt 5.3 which is only available in Ubuntu 14.10. You can solve this by, Using the Emulator for testing your applications. So you code on Trusty, ...


3

The simplest solution would be to set width: parent.width/4 for each of the checkboxes. If you want to keep the checkbox width set at some known value, you could instead set spacing: (parent.width - 4 * checkboxwidth)/3 on the Row. Note that this will cause the elements to overlap when the parent is narrow. If you're targeting Qt 5.1 or higher, you may ...



Top 50 recent answers are included