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. Copy from QPlainTextEdit to Excel

Copy from QPlainTextEdit to Excel

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

    I have filled a QPlainTextEdit with Text in a table form, means I have lines with Tab-separated fields.
    When I copy the contend via Ctrl-A Ctrl-C and paste into Excel I get only on cell per line.
    It looks as if the Tab is missing in the Clipboard text, but when I copy in into a text-editor is has Tabs (When I copy this text again in the Clipboard and paste it into Excel it works again.)
    Then I have tried to copy the PlainTextEdit-content via code to the clipboard. The pasting with this clipboard contents works corrent.

    So my question what makes Qt when I copy via Ctrl-C ????

    raven-worxR 1 Reply Last reply
    0
    • Andy314A Andy314

      I have filled a QPlainTextEdit with Text in a table form, means I have lines with Tab-separated fields.
      When I copy the contend via Ctrl-A Ctrl-C and paste into Excel I get only on cell per line.
      It looks as if the Tab is missing in the Clipboard text, but when I copy in into a text-editor is has Tabs (When I copy this text again in the Clipboard and paste it into Excel it works again.)
      Then I have tried to copy the PlainTextEdit-content via code to the clipboard. The pasting with this clipboard contents works corrent.

      So my question what makes Qt when I copy via Ctrl-C ????

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Andy314 said:

      So my question what makes Qt when I copy via Ctrl-C ????

      The widget puts the selected content into the clipboard in various different formats (text/plain, text/html, etc.)
      The target application takes the one it thinks it is the most appropriate for pasting. So you don't have any influence on that. Only by choosing what is offered in the first place.

      There are clipboard inspectors available. Or you even can simply build one yourself with Qt, it's quite easy. And check what are the contents of the clipboard.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      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