When coding in PyQt (or PySide) should I use Python functions or equivalent Qt functions?

When writing code using PyQt or PySide, sometimes the equivalent function is available in both Qt and Python (for example, QDir.existsQt vs os.path.existsin Python). In these cases, is there an established practice of using the language?

I am wondering if speed, refactoring, etc. can be important.

Thank.

+5
source share
1 answer

As I understand it, many of these Qt functions were introduced for cross-platform compatibility, while others for integration with Qt. However, Python already includes cross-platform features, so I prefer Python whenever possible, as they

  • More familiar to Python programmers
  • Qt
  • Python

, , Qt, Qt / , Python.

, . ++: Qt: Qt ++

, , Qt Python.

+2

All Articles