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. A question on using QApplication static members
Forum Updated to NodeBB v4.3 + New Features

A question on using QApplication static members

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 946 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.
  • A Offline
    A Offline
    Archie888
    wrote on 24 Apr 2017, 07:06 last edited by Archie888
    #1

    I am making a QML-based application, no widgets needed.

    If I need to change some application setting that seems only to be changeable with the QApplication class, such as by using QApplication::setDoubleClickInterval(int), will setting QT += widgets in the .pro file bring all the widget stuff into the application and increase its size in a manner that I might not prefer?

    If this is so, is there any way around this to change such settings? Thanks.

    A 1 Reply Last reply 24 Apr 2017, 07:13
    0
    • A Archie888
      24 Apr 2017, 07:06

      I am making a QML-based application, no widgets needed.

      If I need to change some application setting that seems only to be changeable with the QApplication class, such as by using QApplication::setDoubleClickInterval(int), will setting QT += widgets in the .pro file bring all the widget stuff into the application and increase its size in a manner that I might not prefer?

      If this is so, is there any way around this to change such settings? Thanks.

      A Offline
      A Offline
      Archie888
      wrote on 24 Apr 2017, 07:13 last edited by Archie888
      #2

      I see that there is a QStyleHints object accessible from the QGuiApplication, that can be inquired upon. It seems to be read-only, and contain system settings.

      Should this be taken so that the latest general direction of Qt is to let the application follow the user's system settings always, and not to customize such things?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 24 Apr 2017, 23:04 last edited by SGaist
        #3

        Hi,

        For setDoubleClickInterval, both macOS and Windows value are taken from the system.

        System settings are read-only because they are system settings and that the user of your application can modify them at system level. Part of this is to ensure a consistant behaviour of your application with the rest of your users system. Imagine that you start using an application that consider a double click after twice the amount of what the system uses, wouldn't it feel strange and uncomfortable ?

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

        A 1 Reply Last reply 25 Apr 2017, 01:34
        1
        • S SGaist
          24 Apr 2017, 23:04

          Hi,

          For setDoubleClickInterval, both macOS and Windows value are taken from the system.

          System settings are read-only because they are system settings and that the user of your application can modify them at system level. Part of this is to ensure a consistant behaviour of your application with the rest of your users system. Imagine that you start using an application that consider a double click after twice the amount of what the system uses, wouldn't it feel strange and uncomfortable ?

          A Offline
          A Offline
          Archie888
          wrote on 25 Apr 2017, 01:34 last edited by
          #4

          @SGaist Agreed.

          1 Reply Last reply
          0

          1/4

          24 Apr 2017, 07:06

          • Login

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