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. How can I take the contents of a docx file and put them in TextEdit?
Forum Updated to NodeBB v4.3 + New Features

How can I take the contents of a docx file and put them in TextEdit?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 344 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.
  • V Offline
    V Offline
    vuduongthanh
    wrote on last edited by
    #1

    How can I take the contents of a docx file with text in the same color and font format and put them in textedit?

    JonBJ 1 Reply Last reply
    0
    • V vuduongthanh

      How can I take the contents of a docx file with text in the same color and font format and put them in textedit?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @vuduongthanh Did you try copying and pasting? Is that what you want?

      V 1 Reply Last reply
      0
      • JonBJ JonB

        @vuduongthanh Did you try copying and pasting? Is that what you want?

        V Offline
        V Offline
        vuduongthanh
        wrote on last edited by
        #3

        @JonB I want to get it by passing in a path to the .docx file then the code will take the data from the docx file and pass it to TextEdit on the screen

        JonBJ 1 Reply Last reply
        0
        • V vuduongthanh

          @JonB I want to get it by passing in a path to the .docx file then the code will take the data from the docx file and pass it to TextEdit on the screen

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @vuduongthanh
          Then you need a library which can read docx format files. Unless they are just HTML you can't put them into a QTextEdit. Might be possible via QAxObject. https://forum.qt.io/topic/95874/read-doc-and-docx-files/11. There may also be some libraries written for or working with Qt/C++.

          V 1 Reply Last reply
          1
          • JonBJ JonB

            @vuduongthanh
            Then you need a library which can read docx format files. Unless they are just HTML you can't put them into a QTextEdit. Might be possible via QAxObject. https://forum.qt.io/topic/95874/read-doc-and-docx-files/11. There may also be some libraries written for or working with Qt/C++.

            V Offline
            V Offline
            vuduongthanh
            wrote on last edited by
            #5

            @JonB Thank you very much

            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