Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Problems with the dynamicCall method usage in the QAxWidget class
Forum Updated to NodeBB v4.3 + New Features

Problems with the dynamicCall method usage in the QAxWidget class

Scheduled Pinned Locked Moved Unsolved Qt 6
2 Posts 2 Posters 308 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.
  • H Offline
    H Offline
    howerl
    wrote on last edited by
    #1

    Development environment:Python3.11+PySide6 6.6.1
    Word document is displayed via QAxWidget embedding, and a syntax error is always prompted during the use of dynamicCall, with the error message "Unexpected Type: (str, str) Possible Type: (bytes, Any)(bytes, Sequence)". The code is as follows, please see what the problem is?

    doc_path = "C:\Path\To\Your\Document.docx"
    self.word_widget.dynamicCall("Documents.Open(const QString&)", doc_path)
    微信图片_20231208235935.png

    JonBJ 1 Reply Last reply
    0
    • H howerl

      Development environment:Python3.11+PySide6 6.6.1
      Word document is displayed via QAxWidget embedding, and a syntax error is always prompted during the use of dynamicCall, with the error message "Unexpected Type: (str, str) Possible Type: (bytes, Any)(bytes, Sequence)". The code is as follows, please see what the problem is?

      doc_path = "C:\Path\To\Your\Document.docx"
      self.word_widget.dynamicCall("Documents.Open(const QString&)", doc_path)
      微信图片_20231208235935.png

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

      @howerl
      Just this was asked the other day, there will be a recent thread for this maybe a week ago. the sad upshot was that it appears to be a PySide issue, with currently no known fix. I asked the other poster to try with PyQt instead of PySide and it worked fine....

      EDIT
      It's https://forum.qt.io/topic/152615/why-does-calling-dynamiccall-and-querysubobject-always-get-an-error-in-qaxwidget , and you were the poster, though you don't even reference that from here which would at least have been helpful. So you already know the answer, what's the point of this new thread? You know what the problem is, and you know there is apparently no solution with PySide6, so....

      Have you reported this on the Qt bug tracker? You really need a Qt PySide developer to have a look at this issue.

      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