Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QClipboard setText not working
Forum Update on Monday, May 27th 2025

QClipboard setText not working

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.3k 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.
  • B Offline
    B Offline
    BDMarler
    wrote on last edited by
    #1

    I can't seem to figure out how to get QClipboard to work right. clear and setText seem to do nothing. Am I missing something here?

    @
    auto *pClip=QApplication::clipboard();
    pClip->clear();//no effect?
    pClip->setText("abc");//no effect?
    QString str=pClip->text()//returns whatever was in clipboard prior to above code@

    1 Reply Last reply
    0
    • VinorcolaV Offline
      VinorcolaV Offline
      Vinorcola
      wrote on last edited by
      #2

      On which plateforme are you?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        BDMarler
        wrote on last edited by
        #3

        windows 7 using qt 5.3.1

        1 Reply Last reply
        0

        • Login

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