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. Loading QPA plugin from Python

Loading QPA plugin from Python

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 2 Posters 394 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by A Former User
    #1

    Hello,

    does anybody know how to load a QPA plugin from inside Python?

    I couldn't find any documentation for this, only how to load the plugin with qml ... -plugin ... directly, googling this problem only yields searches regarding errors.

    I've already tried the QPluginLoader, which didn't work:

    engine = QQmlApplicationEngine()
    engine.rootContext().setContextProperty("synthesizer", synthesizer)
    engine.load(Path(__file__).resolve().parent / "main.qml")
    tuio = QPluginLoader("TuioTouch") # <- this is the name of the plugin, don't know what else to put here
    tuio.load() # -> doesn't load the plugin :(
    

    and then tried to load the plugin via environment variable from inside Python, which didn't work either.

    There really should be an easy way to get this working, no?

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Update: setting the environment variable from outside Python works! But still, is there no more comfortable way to set this programmatically?

      JonBJ 1 Reply Last reply
      1
      • ? A Former User

        Update: setting the environment variable from outside Python works! But still, is there no more comfortable way to set this programmatically?

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @3n3l
        I don't know about the whole area, but you can set an environment variable as the first statement in a Python program if that is what you need for the later code?

        1 Reply Last reply
        1

        • Login

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