Tag Info

Hot answers tagged

19

The short answer is "no." Strictly speaking, the Linux kernel provides little more than a direct interface to the hardware it is running on. There is an entire stack of additional Android-phone-specific APIs, programs, applications, etc. on which Android applications depend. Additionally, Android does not run on a generic Linux kernel, but instead runs on ...


3

Try: text: text ? text : "default text" "undefined" is just a string representation of a reference not referencing anything, just like None, or NULL in other languages. === is strict comparison operator, you might want to read this thread: http://stackoverflow.com/questions/523643/difference-between-and-in-javascript


3

This property holds the name of the object. The objectName is a QString property of QObject which defaults to an empty QString. You usually set this property when you need to find QML elements from Qt. By this way the signals, properties and functions of a QML element can be accessed from Qt (C++) code. Autopilot tests use this property to introspect your ...


2

1: It's used to lookup objects by name 2: All of them, it comes from QObject 3: It's used by autopilot to introspect your app from test cases 4: I'm not really sure 5: I don't think the id is discoverable from outside tools (like autopilot)


2

It works if you follow this procedure: Installing the Go Language You have to modify your ~/.bashrc as follows. nano ~/.bashrc export GOPATH=/srv/go if [ -d "/usr/lib/go/bin" ] ; then PATH="${GOPATH}/bin:/usr/lib/go/bin:${PATH}" fi


1

I you need to keep the column size, do not use the visible property, prefer to set the Item opacity to 0: Example: import QtQuick 2.0 Rectangle { width: 200 height: 200 Column { /* outer column */ spacing: 10 Text { text: "Column Element"} Column { /* inner column */ x: 10; y: 10 spacing: 10 Rectangle ...


1

What actually happened in detail is hard to tell, but I'll give an example of the kind of problem. What is important is that the program worked on 10.04, but fails on 14.0. The exact problem could be different, but similar and related: Something is against the rules The error "segmentation fault" usually means some memory was accessed that does not ...


1

Why conio.h Isn't Available g_p mostly answered this in a comment: conio.h is not present in Linux. You need to use curses or ncurses. But if you are getting error likefatal error: curses.h: No such file or directory', it means this library is not installed. For more information on conio.h (and how it's DOS/Windows specific), see the Wikipedia article ...


1

In JavaScript/QML, objects are data (variables), with properties and methods. You can also create your own objects. This example creates an object called "results", and adds four properties to it: property var results: {"passed": 15, "failed": 2, "skipped": 1, "IlikeYourQuestions": 1}; You could also add methods to it, but with just a set of properties, ...


1

You can use almost all the javascript syntax in QML (See http://qt-project.org/doc/qt-5/ecmascript.html). The fastest method is Math.round(<NUM> * 100) / 100 But (<NUM>).toFixed(2) works (but is too slow according to this question on SO) The following snippet of code presents both implementations: import QtQuick 2.0 import Ubuntu.Components ...


1

Why do you think it does not work? The following snippet of code works correctly for me: import QtQuick 2.0 import Ubuntu.Components 0.1 MainView { id: root width: units.gu(100) height: units.gu(100) Row { id: row spacing: 2 Rectangle { color: "red"; width: 50; height: 50 } Rectangle { color: "green"; ...


1

onClicked: { Qt.openUrlExternally("http://bbc.co.uk/"); }



Only top voted, non community-wiki answers of a minimum length are eligible