qtkeychain icon indicating copy to clipboard operation
qtkeychain copied to clipboard

Add QML Support using Qt6

Open CMGeorge opened this issue 1 year ago • 1 comments

All changes did not affects your iplementation. Addes some Q_INVOKABLE and Q_PROPERTY + minor changes using #ifdef Tested for the moment only o Mac but should work everywhere

Only thing you should take in consideration is the set of SET(CMAKE_AUTOMOC ON) and remove of QT_WRAP_CPP(qtkeychain_MOC_OUTFILES keychain.h keychain_p.h gnomekeyring_p.h)

QT_WRAP_CPP iterfer with crating qmltypes Full informations:

New:

Added QML support on Qt6 using cmake To activate set the qt6 and qml flags

-DBUILD_WITH_QT6=ON -DQTKEYCHAIN_BUILD_WITH_QML=ON
import QtKeychain 1.0
WritePasswordJob{
        id: storeJobObject
        service: ""
        onFinished: {
            console.debug("Store password complete")
        }
    }
    ReadPasswordJob{
        id: readJobObject
        service: ""

    }
storeJobObject.key = "username";
storeJobObject.setTextData("password");
storeJobObject.start();

readJobObject.key = "username"
readJobObject.finished.connect(function (returnedPassword){
                console.debug("Password is: "+returnedPassword.textData())
})
readJobObject.start();

CMGeorge avatar May 23 '23 11:05 CMGeorge