14

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.

zeFree
  • 2,129
  • 2
  • 31
  • 39
coolboymark
  • 203
  • 1
  • 3
  • 9

1 Answers1

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,

  • QStringstr (unicode in Python 2)
  • QVariant → whatever type
  • QByteArraybytes or bytearray

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