简体   繁体   中英

Is QQueue missing from PyQt (5)?

I'm stumbling over a strange issue: is it possible that the QQueue class from Qt5 ( http://doc.qt.io/qt-5/qqueue.html ) is not present in PyQt? I couldn't import it and then realized it isn't in this list of PyQt5 classes: http://pyqt.sourceforge.net/Docs/PyQt5/

Is this true? If so, is there a reason? and an alternative short of implementing my own class

(Reference: This commit on Github and discussion in comments )

It is obviously not possible for PyQt/PySide to support template classes, since they depend on a feature that is specific to C++.

In general, you should just use the equivalent built-in python type instead (or, where applicable, whatever implementation is currently available in the standard library - eg queue.Queue or collections.deque ).

PS:

Regarding QProcess.errorOccurred - this signal is available in PyQt-5.8.2, and has been since at least PyQt-5.3.2 (which is the oldest version I can check). The QProcess.error signal is obsolete , and should not be used in new code.

PPS:

PyQt5 is certainly not "still in development" (but PySide for Qt5 is).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM