您的位置:首页 > 编程语言 > Python开发

Python and PyQt conflicts on hex()

2014-12-20 08:48 267 查看
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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: