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_NO_TOUCH_COMPRESSION windows installer

QML_NO_TOUCH_COMPRESSION windows installer

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 979 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.
  • M Offline
    M Offline
    miguelorenes
    wrote on last edited by
    #1

    Based on https://forum.qt.io/topic/76941/qquickitem-touchevent-rate I am setting QML_NO_TOUCH_COMPRESSION to get a bigger touch event rate on my application when developing.
    Now I need to deploy my app and I find a new problem, QT uses internally QML_NO_TOUCH_COMPRESSION to initialize statically a variable:

    static bool qquickwindow_no_touch_compression =
    qEnvironmentVariableIsSet("QML_NO_TOUCH_COMPRESSION");
    

    In case of Windows deployments, Do I have to force to have QML_NO_TOUCH_COMPRESSION in the environment variables? For example, my installer create that environment variable. Is there another way?

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

      Hi,

      IIRC, you can call qputenv before creating your QApplication/QGuiAppilcation object.

      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
      • M Offline
        M Offline
        miguelorenes
        wrote on last edited by
        #3

        Many thanks for the answer.

        Doing this:

        qInfo() << "Touch Compresion" << qEnvironmentVariableIsSet("QML_NO_TOUCH_COMPRESSION");
        qputenv("QML_NO_TOUCH_COMPRESSION", "1");
        QGuiApplication app(argc, argv);
        qInfo() << "Touch Compresion" << qEnvironmentVariableIsSet("QML_NO_TOUCH_COMPRESSION");
        

        I get:

        Touch Compresion false
        Touch Compresion true
        

        But the compression of touch events are done because of qquickwindow_no_touch_compression is initializated statically in a .cpp file out of a function/method, so that action(set qquickwindow_no_touch_compression) will be done before first main instruction.

        This looks like fixed in qt5.9: http://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/quick/items/qquickwindow.cpp?h=5.9, as in that case qquickwindow_no_touch_compression will be initialized when getting the first touch event.

        I am using 5.7.1, I think I am forced to set the environment variable in the installer.

        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