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
Forum Updated to NodeBB v4.3 + New Features

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.3k Views 3 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.
  • D Offline
    D Offline
    duncan98
    wrote on 7 Feb 2020, 01:25 last edited by duncan98 2 Jul 2020, 01:27
    #1

    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

    J 1 Reply Last reply 7 Feb 2020, 01:44
    1
    • D duncan98
      7 Feb 2020, 01:25

      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

      J Offline
      J Offline
      JKSH
      Moderators
      wrote on 7 Feb 2020, 01:44 last edited by
      #2

      @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:

      Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it.

      The doumentation is at https://doc.qt.io/qt-5/richtext-html-subset.html

      It seems that it's not completely compatible with html4

      You are right; Qt Widgets are not completely compatible with HTML4. It only supports a subset of HTML4.

      If you want full HTML5 compatibility, consider the Qt WebEngine: https://doc.qt.io/qt-5/qtwebengine-index.html (Note: This is a heavyweight web engine; if you use it, be sure to subscribe to security advisories and patch your app as soon as a security patch is released)

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

      D 1 Reply Last reply 7 Feb 2020, 02:04
      5
      • J JKSH
        7 Feb 2020, 01:44

        @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:

        Why the help document does not have a complete example of HTML? I think it's completely guesswork to use it.

        The doumentation is at https://doc.qt.io/qt-5/richtext-html-subset.html

        It seems that it's not completely compatible with html4

        You are right; Qt Widgets are not completely compatible with HTML4. It only supports a subset of HTML4.

        If you want full HTML5 compatibility, consider the Qt WebEngine: https://doc.qt.io/qt-5/qtwebengine-index.html (Note: This is a heavyweight web engine; if you use it, be sure to subscribe to security advisories and patch your app as soon as a security patch is released)

        D Offline
        D Offline
        duncan98
        wrote on 7 Feb 2020, 02:04 last edited by duncan98 2 Jul 2020, 02:05
        #3

        @JKSH
        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

        J 1 Reply Last reply 7 Feb 2020, 02:25
        1
        • D duncan98
          7 Feb 2020, 02:04

          @JKSH
          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

          J Offline
          J Offline
          JKSH
          Moderators
          wrote on 7 Feb 2020, 02:25 last edited by
          #4

          @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

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

          D 1 Reply Last reply 7 Feb 2020, 02:44
          4
          • J JKSH
            7 Feb 2020, 02:25

            @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 7 Feb 2020, 02:44 last edited by
            #5

            @JKSH
            I need HTML examples, not rich text

            J 1 Reply Last reply 7 Feb 2020, 03:18
            -1
            • D duncan98
              7 Feb 2020, 02:44

              @JKSH
              I need HTML examples, not rich text

              J Offline
              J Offline
              JKSH
              Moderators
              wrote on 7 Feb 2020, 03:18 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 7 Feb 2020, 03:33
              4
              • J JKSH
                7 Feb 2020, 03:18

                @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 7 Feb 2020, 03:33 last edited by
                #7

                @JKSH
                There is no use of HTML in it

                J 1 Reply Last reply 7 Feb 2020, 03:38
                0
                • D duncan98
                  7 Feb 2020, 03:33

                  @JKSH
                  There is no use of HTML in it

                  J Offline
                  J Offline
                  JKSH
                  Moderators
                  wrote on 7 Feb 2020, 03:38 last edited by JKSH 2 Jul 2020, 03:38
                  #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 7 Feb 2020, 04:55
                  2
                  • J JKSH
                    7 Feb 2020, 03:38

                    @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 7 Feb 2020, 04:55 last edited by
                    #9

                    @JKSH
                    What is this mess

                    jsulmJ J 2 Replies Last reply 7 Feb 2020, 05:25
                    -3
                    • D duncan98
                      7 Feb 2020, 04:55

                      @JKSH
                      What is this mess

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 7 Feb 2020, 05:25 last edited by
                      #10

                      @duncan98 This "mess" is HTML...

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

                      D 1 Reply Last reply 7 Feb 2020, 05:31
                      2
                      • jsulmJ jsulm
                        7 Feb 2020, 05:25

                        @duncan98 This "mess" is HTML...

                        D Offline
                        D Offline
                        duncan98
                        wrote on 7 Feb 2020, 05:31 last edited by
                        #11

                        @jsulm
                        This is completely incomprehensible

                        jsulmJ 1 Reply Last reply 7 Feb 2020, 05:33
                        -2
                        • D duncan98
                          7 Feb 2020, 05:31

                          @jsulm
                          This is completely incomprehensible

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on 7 Feb 2020, 05:33 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 7 Feb 2020, 05:39
                          0
                          • jsulmJ jsulm
                            7 Feb 2020, 05:33

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

                            D Offline
                            D Offline
                            duncan98
                            wrote on 7 Feb 2020, 05:39 last edited by
                            #13

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

                            jsulmJ JonBJ 2 Replies Last reply 7 Feb 2020, 05:42
                            0
                            • D duncan98
                              7 Feb 2020, 04:55

                              @JKSH
                              What is this mess

                              J Offline
                              J Offline
                              JKSH
                              Moderators
                              wrote on 7 Feb 2020, 05:41 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
                                7 Feb 2020, 05:39

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

                                jsulmJ Offline
                                jsulmJ Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on 7 Feb 2020, 05:42 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
                                  7 Feb 2020, 05:39

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

                                  JonBJ Offline
                                  JonBJ Offline
                                  JonB
                                  wrote on 7 Feb 2020, 08:13 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 7 Feb 2020, 08:24
                                  2
                                  • JonBJ JonB
                                    7 Feb 2020, 08:13

                                    @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 7 Feb 2020, 08:24 last edited by
                                    #17

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

                                    JonBJ J 2 Replies Last reply 7 Feb 2020, 08:44
                                    0
                                    • D duncan98
                                      7 Feb 2020, 08:24

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

                                      JonBJ Offline
                                      JonBJ Offline
                                      JonB
                                      wrote on 7 Feb 2020, 08:44 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
                                        7 Feb 2020, 08:24

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

                                        J Offline
                                        J Offline
                                        JKSH
                                        Moderators
                                        wrote on 7 Feb 2020, 09:34 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 7 Feb 2020, 11:15
                                        3
                                        • J JKSH
                                          7 Feb 2020, 09:34

                                          @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 7 Feb 2020, 11:15 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 7 Feb 2020, 11:21
                                          0

                                          1/25

                                          7 Feb 2020, 01:25

                                          • Login

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