Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. The font set by QWebSetting look smaller

The font set by QWebSetting look smaller

Scheduled Pinned Locked Moved Qt WebKit
3 Posts 1 Posters 1.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.
  • W Offline
    W Offline
    wearilybird
    wrote on last edited by
    #1

    i use one QWebview editWebView to edit text ,the code set the QWebView font :

    @
    settings()->setFontFamily(QWebSettings::StandardFont,"simsun");
    settings()->setFontSize(QWebSettings::DefaultFontSize,12);
    @

    i use another one QWebView displayWebView to display text ,using css to set text font,

    @
    <body >
    dsdfdfsfsafd
    </body>
    @

    but i found the text in editWebView look smaller than the text in displayWebView .

    why?

    1 Reply Last reply
    0
    • W Offline
      W Offline
      wearilybird
      wrote on last edited by
      #2

      sorry ,the display test code :
      <body style='"font-family:'simsun';font-size:12pt;color:#000000 ;"'>
      ddddd
      </body>

      1 Reply Last reply
      0
      • W Offline
        W Offline
        wearilybird
        wrote on last edited by
        #3

        the problem has resolved .
        <body style=’"font-family:‘simsun’;font-size:12pt;color:#000000 ;"’> ddddd </body>
        the style code is wrong :
        <body style=’font-family:‘simsun’;font-size:12pt;color:#000000 ;’> ddddd </body>

        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