UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How work with clipboard?

    Scheduled Pinned Locked Moved Solved App Development
    3 Posts 2 Posters 394 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • pavelprostoP Offline
        pavelprosto
        last edited by

        PyQt5 have QClipboard. But this module is not installed by default on the system.
        How work with clipboard in QML project?

        Your donations help me to continue programming free and openSource application development https://liberapay.com/pavelprosto/

        D 1 Reply Last reply Reply Quote 0
        • D Offline
          danqo6 @pavelprosto
          last edited by

          @pavelprosto Hi, I am not aware about qml api in QT for that. In Quickddit we implemented that with c++ https://github.com/accumulator/Quickddit/blob/master/src/qmlutils.cpp#L61
          Documentation to clipboard in Ubuntu.Components is here.
          It is implemented in Ergo library, but you need to provide this library with your project.

          pavelprostoP 1 Reply Last reply Reply Quote 0
          • pavelprostoP Offline
            pavelprosto @danqo6
            last edited by

            @danqo6 Thank you! These methods are easily implemented in a QML project too.

            Main.qml

            import Ubuntu.Components 1.3
            
            ...
            onClicked:{
            var txt="Simple text"
            Clipboard.push(txt);
            }
            ...
            

            Your donations help me to continue programming free and openSource application development https://liberapay.com/pavelprosto/

            1 Reply Last reply Reply Quote 0
            • First post
              Last post