Help needed with QML / Plasmate

How would I change a simple “Hello World” QML script created by Plasmate, i.e. the default example, to display the logged in user instead of “Hello World”:


import QtQuick 1.1
import org.kde.plasma.components 0.1 as PlasmaComponents


Item {
//     width: 200
//     height: 300


    PlasmaComponents.Label {
        text: i18n("Hello World")  // here's where I want the active linux user's username displayed.
    }
}

Is kuser accessible ?

  •    context->setContextProperty("kscreenlocker_userName", KUser().property(KUser::FullName).toString()); +        const KUser user; +        const QString fullName = user.property(KUser::FullName).toString(); +        context->setContextProperty("kscreenlocker_userName", fullName.isEmpty() ? user.loginName() : fullName);         
    

source:- ksmserver/screenlocker/greeter: some screen locker visual fix - Notification of KDE commits - ArchiveOrange

I don’t think there is any declarative component available for that, but would need a C++ code (e.g. as previously stated with screenlocker, or as with lightdm kde greeter)