Navigation

    UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    SOLVED How work with clipboard?

    App Development
    2
    3
    118
    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.
    • pavelprosto
      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?

      D 1 Reply Last reply Reply Quote 0
      • D
        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.

        pavelprosto 1 Reply Last reply Reply Quote 0
        • pavelprosto
          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);
          }
          ...
          
          1 Reply Last reply Reply Quote 0
          • First post
            Last post