Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML TextArea. Get paste event using contextmenu option
Forum Update on Monday, May 27th 2025

QML TextArea. Get paste event using contextmenu option

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 836 Views
  • 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.
  • D Offline
    D Offline
    Diego Donate
    wrote on 21 Sept 2017, 15:55 last edited by
    #1

    Hi,

    I have a QML TextArea, and I need to know the text pasted using the 'paste' option in the contexte menu (mouse right button).

    I can check the paste using keys with:

    Keys.onPressed: function(keyEvent) {
        .....
        if (keyEvent.matches(StandardKey.Paste)){
            ....
    

    and there I can use QT code:

    QClipboard* pClipboard = qApp->clipboard();
    if (pClipboard)
    {
        QClipboard::Mode eMode = QClipboard::Clipboard;
        const QMimeData* pMimeData = pClipboard->mimeData( eMode );
        ....
    

    to get the text in clipboard, before being pasted.

    How can I do the same using whe mouse 'paste' option?

    Thanks,
    Diego

    1 Reply Last reply
    0

    1/1

    21 Sept 2017, 15:55

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved