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 tweak space typographics with QTextEdit ?
Forum Updated to NodeBB v4.3 + New Features

How tweak space typographics with QTextEdit ?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 3.9k 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.
  • M Offline
    M Offline
    Marco_105
    wrote on 28 Apr 2013, 12:32 last edited by
    #1

    Hello,
    would like understanding possibility to tweak space as & thinsp; between letter/word with QTextEdit...

    I try to import a text witch have html format like:

    @"<p style=font-family:plantagenet cherokee;font-

    size:16px;text-indent:0px;margin:0px;text-

    align:justify;white-space:normal;letter-

    spacing:0.01px;word-spacing:0.1px;text-align-

    last:justify;>"

    // word word@

    I observe that style seems doesn't works like:
    word-spacing (with different values)
    text-align: justify
    thin_space looks as an usual space...

    What is possible to do in that case ?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 28 Apr 2013, 12:41 last edited by
      #2

      QTextEdit only supports a very small "subset of HTML/CSS":http://qt-project.org/doc/qt-4.8/richtext-html-subset.html.
      So in this case you're better off with an QWebView and set it's "contentEditable property":http://qt-project.org/doc/qt-4.8/qwebpage.html#contentEditable-prop to get a full HTML/CSS support.

      --- 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
      • M Offline
        M Offline
        Marco_105
        wrote on 28 Apr 2013, 12:51 last edited by
        #3

        Ah Ok, that's look a better way ! I'm going to try it...

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rittk
          wrote on 29 Apr 2013, 05:53 last edited by
          #4

          Feel free to request support for letter-spacing and word-spacing tags in QSS via bug tracker.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Marco_105
            wrote on 29 Apr 2013, 10:35 last edited by
            #5

            @Konstantin Ritt: I don't understand exactly what you mean, may be add a tag for it ?

            @Raven_worx : I have trying QWebView with previewer sample whitch works with the code above as expected... but i saw some difference with same code run on a web apps like CkEditor (a text editor in JS).

            I observe that space between words have not same bulk (it's very special things about typographics displaying), what result in some line are largest/smallest that expected and text format dissolve.

            I observe also double space in the html text doesn't work, don't know why...

            1 Reply Last reply
            0
            • R Offline
              R Offline
              raven-worx
              Moderators
              wrote on 29 Apr 2013, 10:46 last edited by
              #6

              [quote author="Marco_105" date="1367231732"]@Konstantin Ritt: I don't understand exactly what you mean, may be add a tag for it ?[/quote]

              he meant you can submit a bug "here":https://bugreports.qt-project.org.

              [quote author="Marco_105" date="1367231732"]
              @Raven_worx : I have trying QWebView with previewer sample whitch works with the code above as expected... but i saw some difference with same code run on a web apps like CkEditor (a text editor in JS).

              I observe that space between words have not same bulk (it's very special things about typographics displaying), what result in some line are largest/smallest that expected and text format dissolve.

              I observe also double space in the html text doesn't work, don't know why...[/quote]

              The engine used by QWebView is webkit so if you compared your sample to your JS editor in another browser it may be that there are small differences in rendering. Also it may be possible that the JS editor adds some additional CSS which also impacts rendering the mentioned differences.

              You need to investigate further what causes the difference appearing directly in HTML. i would suggest using "Firebug browser extension":https://getfirebug.com/ in your (external) browser.

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

              4/6

              29 Apr 2013, 05:53

              • Login

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