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. Problem with AA_EnableHighDpiScaling and TableView (Textsize)
Qt 6.11 is out! See what's new in the release blog

Problem with AA_EnableHighDpiScaling and TableView (Textsize)

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 2 Posters 2.4k Views 2 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
    Grisu
    wrote on last edited by
    #1

    Hi,
    I've got a problem with the height and text size of rows in a table.
    I'm Using Qt 5.8 and the Tableview example (Qt\Examples\Qt-5.8\quickcontrols\controls\tableview)

    int main(int argc, char *argv[])
    {
        //This new line is causing the offense:
        QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
        QtQuickControlsApplication app(argc, argv);
    

    When the attribute AA_EnableHighDpiScaling is set, buttons and texts have a nice size.
    The problem is that the rows are nearly three times higher than buttons.
    Is this a bug or a mistake by me?
    Greetings Grisu

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should also add which platform you are running on.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Grisu
        wrote on last edited by
        #3

        Hi,
        it's Android "6.01 on a Samsung Galaxy S5 mini" and "7.0 on a Galaxy S7".
        On Windows 10 everything looks good.

        Thanks fpr the hint.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What if you disable it for the failing platforms ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • G Offline
            G Offline
            Grisu
            wrote on last edited by
            #5

            I'm such an idiot.
            I don't need the attribute, if you use the Label Control and not the Text Control, and delete the font-size every Control has the right size.

            Sorry for bothering you, cannot see the wood for the trees....

            Thanks for your help

            Grisu

            1 Reply Last reply
            0
            • G Offline
              G Offline
              Grisu
              wrote on last edited by Grisu
              #6

              Ok,
              I reopened it. After one week I realized, that I need the AA_EnableHighDpiScaling attribute, because without it there are a lot of other problems with QtQuick Controls on Android.

              I opened a bug about this problem: QTBUG-62338

              Does someone know an alternativ for the TableView?

              This is how the Tableview looks with the Attribute on Android
              With the Attribbute

              This is how the Tableview looks without the Attribute on Android
              Without the Attribbute

              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