I want to use QString
and QStringList
but can not find them in PySide 1.1.0
modules or documents. Not just QString
and QStringList
, I can not find QTableModel
, QListModel
etc. either.
Asked
Active
Viewed 1.1k times
1 Answers
26
You don't need QString or QStringList: you can use Python's native types anywhere they would be needed in C++/Qt.
More details about this can be found in PSEP 101.
For example,
QString
→str
(unicode
in Python 2)QVariant
→ whatever typeQByteArray
→bytes
orbytearray
And there have never been such classes as QTableModel
and QListModel
in Qt.
You're probably looking for QAbstractTableModel
and QAbstractListModel
.

Oleh Prypin
- 33,184
- 10
- 89
- 99
-
Is there an updated URL for the psep-0101 link? I can't seem to find this resource anywhere. – barik Oct 19 '13 at 17:26
-
@barik Searching for `psep-0101` gives, for example, [**this result**](https://qt.gitorious.org/pyside/pseps/source/5a753a0f6b518b6a249ba5820fc05c450daf961c:psep-0101.txt). – Oleh Prypin Oct 19 '13 at 18:02
-
Both psep-0101.html links (in the answer and in the comment) are broken. – Brandin Nov 01 '16 at 16:55