[PyQt] PyQt5 : QAxContainer help

MOHAMED BLACK bl3a3ck at gmail.com
Wed Feb 4 09:22:12 GMT 2015


hi,

i need some help to get QAxContainer to work
for now i don't know if this is a bug or not
here is the code
Test.py

# -*- coding: utf-8 -*-
from PyQt5.QAxContainer import *

objIWbemLocator =QAxObject("WbemScripting.SWbemLocator")
print(objIWbemLocator)
objWMIService=objIWbemLocator.querySubObject("ConnectServer(.,root\\CIMV2)")
print(objWMIService)

the objWMIService object always return None ?

the equivalent pywin32 works fine!
import win32com.client
objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator")
self.objSWbemServices = objWMIService.ConnectServer('.',"root\\CIMV2")

win xp sp3
vs 2010 sp1
qt 5.4
python 3.4.2
latest snapshot sip pyqt

thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150204/b42c7084/attachment.html>


More information about the PyQt mailing list