Details
-
Bug
-
Resolution: Done
-
P4: Low
-
None
-
5.6.0 Alpha
-
None
-
Windows 7 (x64).
Visual Studio 2012 (32bit).
-
Fixed in PyWin32 release 220
Description
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.
Attachments
Issue Links
- relates to
-
QTBUG-49355 Broken ActiveX JavaScript scripting
- Reported
-
QTBUG-12202 Calling a slot using COM (ActiveQt) from Python with the win32 extensions fails when the slot takes a QObject derived class as a parameter
- Open