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. Selecting data in QTableview using CTRL+C by separating them with comma
Forum Updated to NodeBB v4.3 + New Features

Selecting data in QTableview using CTRL+C by separating them with comma

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 428 Views 1 Watching
  • 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.
  • T Offline
    T Offline
    Thank You
    wrote on 14 Jan 2021, 16:22 last edited by
    #1

    I have a tableview named "info"
    It has selection of extended selection

    What I want is to copy the selected things to clipboard when I select something and press CTRL+C

    Thank You

    Let's make QT free or It will go forever

    TRUE AND FALSE <3

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 14 Jan 2021, 16:26 last edited by mrjj
      #2

      Hi
      Well you can use
      https://doc.qt.io/qt-5/qshortcut.html
      to set up CTRL +C
      then use last code from
      https://stackoverflow.com/questions/27353026/qtableview-output-save-as-csv-or-txt
      and change a bit to use only selected. ( https://doc.qt.io/qt-5/qitemselectionmodel.html )
      and then use
      https://doc.qt.io/qt-5/qclipboard.html
      to put on clipboard.

      1 Reply Last reply
      2

      1/2

      14 Jan 2021, 16:22

      • Login

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