0

In this specific case, I'd like to use the full name of the currently logged-in user in a QML app (not the logname). As far as I found out, system calls can not yet be used (and would not be an elegant solution). Also the Ubuntu SDK documentation seems to cover only UI-related topics.

Is there a method to access the full user name from within a QML app? And in general, are system APIs or the Unity API available to QML apps?

1 Answer 1

0

For that you need to create your own QML plugin what is a simple Qt/C++ code. In that QML plugin you can access the system the same way as you would access from any C++ code and expose the functions, properties to the QML layer.

There is a template available in the Ubuntu SDK.

Open the Ubuntu SDK (QtCreator) go to the "Touch" tab, click on the "Create a new project >" and choose the Ubuntu -> QML Extension Library

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .