Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. application scripting with Python versus QJSEngine
Forum Updated to NodeBB v4.3 + New Features

application scripting with Python versus QJSEngine

Scheduled Pinned Locked Moved Unsolved Qt for Python
1 Posts 1 Posters 252 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.
  • B Offline
    B Offline
    Be.ing
    wrote on last edited by Be.ing
    #1

    Hi, my team has recently updated a legacy QScriptEngine application scripting system to QJSEngine. We are now considering how to redesign the system from scratch. We are using JavaScript to provide a means to interact with DJ controller hardware which we poll for new data frequently (currently it is hardcoded at 1 ms for macOS & Windows and 5 ms for Linux -- although we should change that to account for the size of the audio buffer but that's tangential). We are considering three different approaches currently:

    • JavaScript with QJSEngine
    • QML with QQmlEngine (without Qt Quick)
    • Python with Shiboken

    Although we would prefer to use Python rather than JavaScript, I am unclear how well Qt for Python works for bidirectional interaction between custom C++ classes and Python. The documentation does not say much about this. The scriptableapplication example shows it is possible, but I am still not sure if it is a good idea given our latency requirements. Can we keep the Python interpreter running persistently between polls of the DJ controller hardware to avoid the cost of reinitializing it repeatedly? Would QJSEngine provide better performance because of its tight integration with Qt?

    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