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. Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it. It seems that it's not completely compatible with html4

Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it. It seems that it's not completely compatible with html4

Scheduled Pinned Locked Moved Solved General and Desktop
25 Posts 5 Posters 3.1k 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.
  • JKSHJ JKSH

    @duncan98 said in Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it. It seems that it's not completely compatible with html4:

    This document is too simple. It doesn't even have an example. How do you use it?I just want to print out the data

    The first link was a reference document that tells you all the tags that are supported.

    If you want examples, search your Qt Creator IDE's Examples section. Use "rich text" as your keyword. See https://doc.qt.io/qt-5/examples-richtext.html

    D Offline
    D Offline
    duncan98
    wrote on last edited by
    #5

    @JKSH
    I need HTML examples, not rich text

    JKSHJ 1 Reply Last reply
    -1
    • D duncan98

      @JKSH
      I need HTML examples, not rich text

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #6

      @duncan98 said in Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it. It seems that it's not completely compatible with html4:

      I need HTML examples, not rich text

      The rich text examples are HTML4 examples.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      D 1 Reply Last reply
      4
      • JKSHJ JKSH

        @duncan98 said in Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it. It seems that it's not completely compatible with html4:

        I need HTML examples, not rich text

        The rich text examples are HTML4 examples.

        D Offline
        D Offline
        duncan98
        wrote on last edited by
        #7

        @JKSH
        There is no use of HTML in it

        JKSHJ 1 Reply Last reply
        0
        • D duncan98

          @JKSH
          There is no use of HTML in it

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by JKSH
          #8

          @duncan98 said in Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it. It seems that it's not completely compatible with html4:

          There is no use of HTML in it

          https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/richtext/textedit/example.html?h=5.14

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          D 1 Reply Last reply
          2
          • JKSHJ JKSH

            @duncan98 said in Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it. It seems that it's not completely compatible with html4:

            There is no use of HTML in it

            https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/richtext/textedit/example.html?h=5.14

            D Offline
            D Offline
            duncan98
            wrote on last edited by
            #9

            @JKSH
            What is this mess

            jsulmJ JKSHJ 2 Replies Last reply
            -3
            • D duncan98

              @JKSH
              What is this mess

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #10

              @duncan98 This "mess" is HTML...

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              D 1 Reply Last reply
              2
              • jsulmJ jsulm

                @duncan98 This "mess" is HTML...

                D Offline
                D Offline
                duncan98
                wrote on last edited by
                #11

                @jsulm
                This is completely incomprehensible

                jsulmJ 1 Reply Last reply
                -2
                • D duncan98

                  @jsulm
                  This is completely incomprehensible

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #12

                  @duncan98 I suggest you first take a look at HTML documentation: https://www.w3schools.com/html/

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  D 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @duncan98 I suggest you first take a look at HTML documentation: https://www.w3schools.com/html/

                    D Offline
                    D Offline
                    duncan98
                    wrote on last edited by
                    #13

                    @jsulm
                    I know standard HTML, but qt HTML is very confusing

                    jsulmJ JonBJ 2 Replies Last reply
                    0
                    • D duncan98

                      @JKSH
                      What is this mess

                      JKSHJ Offline
                      JKSHJ Offline
                      JKSH
                      Moderators
                      wrote on last edited by
                      #14

                      @duncan98 said in Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it. It seems that it's not completely compatible with html4:

                      What is this mess

                      You claimed that the rich text examples don't use HTML.

                      I showed you that the Text Edit Rich Text example uses HTML.

                      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                      1 Reply Last reply
                      4
                      • D duncan98

                        @jsulm
                        I know standard HTML, but qt HTML is very confusing

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #15

                        @duncan98 There is no "qt HTML". Qt supports a subset of HTML as @JKSH already pointed out...

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        4
                        • D duncan98

                          @jsulm
                          I know standard HTML, but qt HTML is very confusing

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

                          @duncan98 said in Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it. It seems that it's not completely compatible with html4:

                          @jsulm
                          I know standard HTML, but qt HTML is very confusing

                          I have done HTML for many, many years, so I know it too. What is your actual issue with the subset of HTML supported by Qt, e.g. in a QTextEdit?

                          You can copy the whole of the HTML content from the https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/richtext/textedit/example.html?h=5.14 example you refer to as a "mess", and as well as pasting it into a QTextEdit to look at it you can also save it to an .html file and open it in your web browser. Since it looks pretty similar there, you know it must be reasonably close to HTML. You can use the browser's F12 or your favorite HTML editor to examine the HTML.

                          D 1 Reply Last reply
                          2
                          • JonBJ JonB

                            @duncan98 said in Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it. It seems that it's not completely compatible with html4:

                            @jsulm
                            I know standard HTML, but qt HTML is very confusing

                            I have done HTML for many, many years, so I know it too. What is your actual issue with the subset of HTML supported by Qt, e.g. in a QTextEdit?

                            You can copy the whole of the HTML content from the https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/richtext/textedit/example.html?h=5.14 example you refer to as a "mess", and as well as pasting it into a QTextEdit to look at it you can also save it to an .html file and open it in your web browser. Since it looks pretty similar there, you know it must be reasonably close to HTML. You can use the browser's F12 or your favorite HTML editor to examine the HTML.

                            D Offline
                            D Offline
                            duncan98
                            wrote on last edited by
                            #17

                            @JonB
                            I want to use qtextdocument to print out the data, which will be in HTML format

                            JonBJ JKSHJ 2 Replies Last reply
                            0
                            • D duncan98

                              @JonB
                              I want to use qtextdocument to print out the data, which will be in HTML format

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

                              @duncan98
                              What is your question? You can print from a QTextDocument. It supports precisely the HTML subset we have referenced above. If your content fits into that subset it will work, if your content goes beyond that into non-supported HTML constructs it will not (probably just ignore them). That's just how it is.

                              If you want full HTML support you would need to move to using QtWebEngine. You can print from there too, which would then support full HTML. You can arrange for the content of a QTextDocument to go into a QWebEnginePage if desired. But your original QTextDocument is still liable to be limited to the Qt-supported richtext-HTML subset.

                              1 Reply Last reply
                              3
                              • D duncan98

                                @JonB
                                I want to use qtextdocument to print out the data, which will be in HTML format

                                JKSHJ Offline
                                JKSHJ Offline
                                JKSH
                                Moderators
                                wrote on last edited by
                                #19

                                @duncan98 said in Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it. It seems that it's not completely compatible with html4:

                                I want to use qtextdocument to print out the data, which will be in HTML format

                                Please:

                                1. Describe your requirements in more detail.
                                2. Show us what you have tried and didn't work.

                                If you already have another topic that describes that, give us a link to that topic.

                                This topic is about the documentation. Has your question about documentation been answered? If so, close the topic.

                                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                D 1 Reply Last reply
                                3
                                • JKSHJ JKSH

                                  @duncan98 said in Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it. It seems that it's not completely compatible with html4:

                                  I want to use qtextdocument to print out the data, which will be in HTML format

                                  Please:

                                  1. Describe your requirements in more detail.
                                  2. Show us what you have tried and didn't work.

                                  If you already have another topic that describes that, give us a link to that topic.

                                  This topic is about the documentation. Has your question about documentation been answered? If so, close the topic.

                                  D Offline
                                  D Offline
                                  duncan98
                                  wrote on last edited by
                                  #20

                                  @JKSH
                                  My requirement is to print the data in the qtablewidget. Is there an easy way to do this

                                  mrjjM JonBJ 2 Replies Last reply
                                  0
                                  • D duncan98

                                    @JKSH
                                    My requirement is to print the data in the qtablewidget. Is there an easy way to do this

                                    mrjjM Offline
                                    mrjjM Offline
                                    mrjj
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #21

                                    Hi
                                    You mean like this ?
                                    https://forum.qt.io/topic/78143/export-a-qtablewidget-in-pdf

                                    1 Reply Last reply
                                    2
                                    • D duncan98

                                      @JKSH
                                      My requirement is to print the data in the qtablewidget. Is there an easy way to do this

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

                                      @duncan98
                                      Your first decision is whether you want to print as a QTableWidget, with how that appears, or whether you want to export its content to a QTextDocument and print as a generic table. I have done both.

                                      D 1 Reply Last reply
                                      4
                                      • JonBJ JonB

                                        @duncan98
                                        Your first decision is whether you want to print as a QTableWidget, with how that appears, or whether you want to export its content to a QTextDocument and print as a generic table. I have done both.

                                        D Offline
                                        D Offline
                                        duncan98
                                        wrote on last edited by
                                        #23

                                        @JonB
                                        How can qtablewidget be printed directly?

                                        JonBJ 1 Reply Last reply
                                        0
                                        • D Offline
                                          D Offline
                                          duncan98
                                          wrote on last edited by
                                          #24
                                          This post is deleted!
                                          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