Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qml problem with font size
Forum Updated to NodeBB v4.3 + New Features

Qml problem with font size

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.7k 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.
  • G Offline
    G Offline
    Galbarad
    wrote on 3 Jul 2014, 21:55 last edited by
    #1

    Hi all
    I have problem with font in my application for Android
    I am use this code
    @
    font.pixelSize: 46 * gameField.height / 800
    @
    for scaling font size on different screens
    but I have a problem with at list one device
    !http://gm1.ggpht.com/mJEs2w50CoMkNhdZnF9pT4p16S9FwzgIEJbckd6SdqvKYlPnAwIU62m1ufP3ZThGduz8jA24V3J4Eal1ndpDvNp0JlZalxZGAdWMSDAaGZUte1rihFC4toZsqLQ5cgVFQK7sdcHBrnrw_BNYhs3xs1zbsElpnXy7-YI4Uokv76wb-VnEZohlXklLK3Hz4BmltsSIQoM4F4QwOyJgdtTNRBbbctX0hmo8UdgTTmC1DFp8w6duxoDcq_yDOx_qgr7-G8CEtju9sd7Tc_KDy29pLWDnljCh-qE_hSiN8j77EGTQayE60aEiIxkgG-SvCSxCZb5QG8XlhPCmXxlsKII_zNNlh-Yu-d6evek85gG0C2kaFh6NJgtoHHDwxow5QytQD-pafbLc_wfzXs_eIB5s-aeXTNq_1kwXr-w2GsREjDTPXKdPiwXoPN7nhprDNIlwbC2Oz4vhVlsYEhns7YuJzRE_a4uSn3VybX_DANAOFS1cepCT51ltz2iuEm54a-tgY1rLPmAmCKCPcGyPSXnfigsHZfRwPf7f5XiWemgVPXHEO4LuFgHiQA4MTzVGbVvmUNezxbRYPw=w1886-h849-l75(problem with font qml + android)!

    maybe I should use font.pointSize instead of font.pixelSize ??
    thanks for help

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dheerendra
      Qt Champions 2022
      wrote on 4 Jul 2014, 02:19 last edited by
      #2

      Better to use the pointSize. Also you can calculate 46/800 only once and use it everywhere. It may little bit performance impact with propertybindings every time.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Galbarad
        wrote on 4 Jul 2014, 13:14 last edited by
        #3

        thank you for reply
        I try to use pointSize, but found in log
        @
        QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
        @

        1 Reply Last reply
        0
        • G Offline
          G Offline
          Galbarad
          wrote on 13 Jul 2014, 07:09 last edited by
          #4

          switching to pointSize do not help, the same problem
          !https://lh3.googleusercontent.com/-bv71O37AKeo/U8Iwagd8XJI/AAAAAAAAG_Q/wdfXHMnbnBg/w549-h878-no/Screenshot_2014-06-27-18-20-56.png(qml problem)!

          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