in PyQt, there is no QString
and hence no need for QStringList
.
Any Qt API that would normally return a QString
, will automatically return a Python string instead. Similarly, any Qt APIs that would normally return a QStringList
will return a Python list containing Python strings. And the opposite also applies: any Qt API that would normally accept a QString
or QStringList
will accept the Python equivalents instead.
谷歌翻译:
在PyQt中,没有QString,因此不需要QStringList。任何通常返回QString的Qt API都会自动返回Python字符串。类似地,通常返回QStringList的任何Qt API都将返回包含Python字符串的Python列表。相反的情况也适用:任何通常接受QString或QstringList的Qt API都将接受Python等价物。