Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-49712

Unable to write to property from python (ActiveQt)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P4: Low P4: Low
    • None
    • 5.6.0 Alpha
    • ActiveX Support
    • None
    • Windows 7 (x64).
      Visual Studio 2012 (32bit).
    • Fixed in PyWin32 release 220

      Python-based scripting of ActiveX controls seem to be partly broken in Qt. Most operations like function calling and property reads work fine, but property write does not seem to work properly.

      I do not know if the problem lies in ActiveQt or PyWin32. Regardless of reason, the issue should at least be debuggable, since both projects are open-source.

      STEPS TO REPRODUCE:

      • Build the src\activeqt\container, examples\activeqt\hierarchy / tools\testcon- projects in the QtActiveQt repo. Make sure that the necessary Qt DLL are found in the search path (deploy the example)
      • Install PyWin32 onto Python
      • Start "testcon", then insert the QParentWidget control (part of the "\qtactiveqt\examples\activeqt\hierarchy" project).-
      • Load the attached "hierarchyax.py" script, select run macro and invoke the "Main()" function.-
      • Run "pyhierarchyax.py" from python.
      • Verify that the property write at the end of the script fails, with a stack trace in the macro log.

      We're also experiencing similar problems from JavaScript that are probably caused by the same underlying Qt bug (https://bugreports.qt.io/browse/QTBUG-49355).

      Related PyWin32 bug report: https://sourceforge.net/p/pywin32/bugs/709/ . This bug report contains a patch that seem to fix this issue.

        1. hierarchyax.py
          0.7 kB
        2. pyhierarchyax.py
          0.5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kleint Friedemann Kleint
            forderud Fredrik Orderud
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: