Pre-conditions:
Import all PyQt libs into Python project(or just one .py file)
Result:
Compiling error such as "Type error of hex(QTestString), the expect type is QTestString" occurs when calling the hex() function.
Solution:
There are 2 solutions so far (for me):
a. Don't import all QT packages into the .py, just the needed ones.
b. Realize your own HEX() function in another .py, which import no QT module, and import this package in you main .py.