PDA

View Full Version : QProcess.pid() returns wrong pid in PyQt(windows)



vertusd
16th April 2011, 05:45
#######
self.m_prohandle = QtCore.QProcess(self)
self.m_prohandle.start( QtCore.QString(self.m_textpalyerName),l_argv)
print int(self.m_prohandle.pid())


i converted sip.voidptr (void* in c++) to int by python builtin method int(),but the result was a large number like 62552816, so what's wrong here?


sorry for my english and thanks in advance

wysota
16th April 2011, 07:57
You are incorrectly assuming that the process has already started by the time you ask for its pid.