I recently started working with PyQt and noticed that there are some Q types that more or less resemble python builtin types like QString
and QStringList
(I guess there are some more).
Till now i just used builtin types like str
and list
instead of these, which worked perfectly fine.
But now I'm wondering:
The PyQt4 package provided QString and QStringList but when it was migrated to PyQt5 it was found that it was not necessary to provide access to those classes since python provided classes that already implemented this functionality, such as str and list of string, respectively.
The objective is to have the greatest possible compatibility so that the developer does not have to know new classes if there are already other classes that already fulfill this task and are provided natively by python.
Going a bit further PySide2 is starting to provide functions that handle numpy objects and other features (like snake_case) so that development is quick and easy.
What is the use of these Q types?
Those classes cannot be used (they are not present in the package) in PyQt5.
Should I use these instead of the builtin types?
No, based on the answer to the previous question.