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. Attach the file in the document
Forum Updated to NodeBB v4.3 + New Features

Attach the file in the document

Scheduled Pinned Locked Moved General and Desktop
14 Posts 5 Posters 5.8k 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.
  • R Offline
    R Offline
    rleojoseph
    wrote on last edited by
    #1

    Hi, am using the TextEdit widget. I can open the files like html and etc in the textedit..
    Now i am trying to attach the file in the TextEdit !! Is it possible? Which class should i use for Attaching a file in the TextEdit ?? Help me out

    Thanks in Advance!!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stukdev
      wrote on last edited by
      #2

      Maybe "setDocument":http://doc.qt.nokia.com/latest/qtextedit.html#setDocument

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dialingo
        wrote on last edited by
        #3

        You can embed a file in an application using the resource system.
        http://doc.qt.nokia.com/4.7/resources.html
        Once the file is added you can easily load it into the TextEdit.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          [quote author="leojoseph" date="1298885450"]Hi, am using the TextEdit widget. I can open the files like html and etc in the textedit..
          Now i am trying to attach the file in the TextEdit !! Is it possible? Which class should i use for Attaching a file in the TextEdit ?? Help me out

          Thanks in Advance!!
          [/quote]

          Define "attach the file in the TextEdit" please.

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

            leojoseph, are you trying to build some kind of email-like client? What do you mean exactly by "attaching a file to a TextEdit"? Load it, or really create some kind of attachment like you have in email applications?

            1 Reply Last reply
            0
            • R Offline
              R Offline
              rleojoseph
              wrote on last edited by
              #6

              THanks for the replies!!
              Am not creating an e-mail client !! I am creating a Texteditor on my own!! Instead of selecting a *.txt or *.html file and displaying it in the TextEdit widget, i thought of attaching that file. Like in MSWord, whenever we select the PDF , it will gets attached along with the Document!! I thought of doing it in the same way!! Please help me

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #7

                What should this "attachment" entail then, exactly? I tried to see what MS Word does, but my version tries to import the PDF if I try to open one. You are still not describing very clearly what you want to achieve. As long as you don't, we can not help you properly.

                So please, sit down and write out what you want to achieve exactly, if possible at all without relying on reference to how third party applications do something, as not everyone has those applications available.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #8

                  [quote author="leojoseph" date="1298895993"]THanks for the replies!!
                  Am not creating an e-mail client !! I am creating a Texteditor on my own!! Instead of selecting a *.txt or *.html file and displaying it in the TextEdit widget, i thought of attaching that file. Like in MSWord, whenever we select the PDF , it will gets attached along with the Document!! I thought of doing it in the same way!! Please help me[/quote]

                  Read "this":http://www.catb.org/~esr/faqs/smart-questions.html. It will help you understanding your actual problem.

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    rleojoseph
                    wrote on last edited by
                    #9

                    K. Let me clear. I have a filename first.doc . I am selecting the File using the QFileDialog. TextEdit will not load Doc files. So i have created a code which will place an image in TextEdit widget , where the image will have the Document URL. So now whenever i click that image , the Doc will be opened by openoffice. Now that is not a Problem. Now my task is to Copy/Import the first.doc into the TextEdit file. Can u get me??

                    The Single TextEdit file which i am going to save should contain all the Documents which i have inserted/attached ?? Is that possible ??

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      goetz
                      wrote on last edited by
                      #10

                      QTextEdit cannot open OpenOffice documents neither can it open Microsoft Word documents. Only plain text and HTML rich text. Additionally, you can safe a QTextEdit's content to OpenOffice format (QTextDocumentWriter).

                      And I prefer being called "you", not "u".

                      http://www.catb.org/~esr/faqs/smart-questions.html

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        rleojoseph
                        wrote on last edited by
                        #11

                        Mr.Volker, i can Explain my Problem elaborately if you want !! But don' ask me to go through all those links to post a Technical Questions. May be i might miss some words while typing , that lead you peoples difficult to find a Problem!!

                        1 Reply Last reply
                        0
                        • R Offline
                          R Offline
                          rleojoseph
                          wrote on last edited by
                          #12

                          Am sorry!!! I know QTextEdit cannot open the OpenOffice documents ! I am using the QDesktopServices to open the Documents ! Thats not a Problem now! What i am trying is to attach a file inside the TextEdit!! Am not inserting, i want to attach / import the file

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            goetz
                            wrote on last edited by
                            #13

                            I'm lost and out.

                            http://www.catb.org/~esr/faqs/smart-questions.html

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              andre
                              wrote on last edited by
                              #14

                              [quote author="leojoseph" date="1298899886"]Mr.Volker, i can Explain my Problem elaborately if you want !! But don' ask me to go through all those links to post a Technical Questions. May be i might miss some words while typing , that lead you peoples difficult to find a Problem!! [/quote]
                              If you can't be bothered to read through a guide that you obviously need to help you formulate a question that we can answer, then why do you assume we can be bothered to play 20 questions with you until we understand what you mean, all the time having to puzzle to try to make out what!! each!! of! your! sentences!! mean!! between all the exclamation points and SMS-like abbreviations?

                              Good luck with your problem, I am out too.

                              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