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. Qt Quick Controls 2 Material size too big on desktop
Forum Updated to NodeBB v4.3 + New Features

Qt Quick Controls 2 Material size too big on desktop

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
8 Posts 4 Posters 3.8k 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.
  • jiancaiyangJ Offline
    jiancaiyangJ Offline
    jiancaiyang
    wrote on last edited by
    #1

    Although Qt Quick Controls 2 designs well, and Material style fascinating, however when we use in desktop, we can bear because the control is too big. I wonder is there any way to adjust the size of control JUST IN A LINE OF CODE, or to configure it?
    0_1514353312437_屏幕快照 2017-12-27 下午1.41.40.png

    我们自己的论坛:http://qtdream.com
    擅长三维角色仿真动画。

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You can tweak the automatic scaling http://doc.qt.io/qt-5.10/qtquickcontrols2-highdpi.html

      Or see QT_SCALE_FACTOR usage described in http://doc.qt.io/qt-5/highdpi.html I think this is exactly what you want :-)

      Additional reading: http://doc.qt.io/qt-5/scalability.html

      (Z(:^

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kofr
        wrote on last edited by
        #3

        you can upvote https://bugreports.qt.io/browse/QTBUG-65061?filter=-2
        cause this high dpi mode works not well on desktop

        1 Reply Last reply
        0
        • jiancaiyangJ Offline
          jiancaiyangJ Offline
          jiancaiyang
          wrote on last edited by
          #4

          0_1514457555417_2017-12-28-183907_642x516_scrot.png

          This is screenshot for Lubuntu.

          1. Use QCoreApplication::setAttribute( Qt::AA_EnableHighDpiScaling ); before QGuiApplication app( argc, argv ); -> Useless
          2. Commented out QCoreApplication::setAttribute( Qt::AA_EnableHighDpiScaling ); -> Useless
          3. Set QT_AUTO_SCREEN_SCALE_FACTOR=1 into "Environment Variable" panel in Qt Creator -> Useless

          I need further help.

          我们自己的论坛:http://qtdream.com
          擅长三维角色仿真动画。

          sierdzioS 1 Reply Last reply
          0
          • jiancaiyangJ Offline
            jiancaiyangJ Offline
            jiancaiyang
            wrote on last edited by
            #5

            This is what Qt Quick Controls 2 demo "gallery" looks like:
            0_1514457781400_2017-12-28-184232_362x556_scrot.png

            I know Qt Quick Controls 2 is targeting mobile devices, but in fact Material theme looks good even in desktop. We need some utility to configure the look'n' feel for Material style.
            BTW: I don't like to make a copy and change the controls one by one.

            我们自己的论坛:http://qtdream.com
            擅长三维角色仿真动画。

            1 Reply Last reply
            0
            • jiancaiyangJ jiancaiyang

              0_1514457555417_2017-12-28-183907_642x516_scrot.png

              This is screenshot for Lubuntu.

              1. Use QCoreApplication::setAttribute( Qt::AA_EnableHighDpiScaling ); before QGuiApplication app( argc, argv ); -> Useless
              2. Commented out QCoreApplication::setAttribute( Qt::AA_EnableHighDpiScaling ); -> Useless
              3. Set QT_AUTO_SCREEN_SCALE_FACTOR=1 into "Environment Variable" panel in Qt Creator -> Useless

              I need further help.

              sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              @jiancaiyang said in Qt Quick Controls 2 Material size too big on desktop:

              I need further help

              Quoting myself: "Or see QT_SCALE_FACTOR usage described in http://doc.qt.io/qt-5/highdpi.html I think this is exactly what you want :-)"

              We need some utility to configure the look'n' feel for Material style. BTW: I don't like to make a copy and change the controls one by one.

              While it is not an utility, there is the conf file described in docs

              (Z(:^

              1 Reply Last reply
              0
              • jpnurmiJ Offline
                jpnurmiJ Offline
                jpnurmi
                wrote on last edited by
                #7

                The Material Design guidelines specify a dense variant for desktop, but it was not (yet?) implemented for Qt Quick Controls 2. This was simply mainly due to lack of resources, but there have been also some performance concerns. Anyway, feel free to vote and/or comment QTBUG-51109 if you think it should be prioritized higher.

                jiancaiyangJ 1 Reply Last reply
                2
                • jpnurmiJ jpnurmi

                  The Material Design guidelines specify a dense variant for desktop, but it was not (yet?) implemented for Qt Quick Controls 2. This was simply mainly due to lack of resources, but there have been also some performance concerns. Anyway, feel free to vote and/or comment QTBUG-51109 if you think it should be prioritized higher.

                  jiancaiyangJ Offline
                  jiancaiyangJ Offline
                  jiancaiyang
                  wrote on last edited by
                  #8

                  @jpnurmi I wish it could be implemented.

                  我们自己的论坛:http://qtdream.com
                  擅长三维角色仿真动画。

                  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