简体   繁体   English

PyQt(5)中缺少QQueue吗?

[英]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? 我绊倒了一个奇怪的问题:PyQt中可能不存在来自Qt5的QQueue类( http://doc.qt.io/qt-5/qqueue.html )? I couldn't import it and then realized it isn't in this list of PyQt5 classes: http://pyqt.sourceforge.net/Docs/PyQt5/ 我无法导入它,然后意识到它不在PyQt5类列表中: 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 ) (参考:对Github的提交评论中的讨论)

It is obviously not possible for PyQt/PySide to support template classes, since they depend on a feature that is specific to C++. PyQt / PySide显然不可能支持模板类,因为它们依赖于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 ). 通常,您应该只使用等效的内置python类型(或者,在适用时,使用标准库中当前可用的任何实现-例如queue.Queuecollections.deque )。

PS: 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). 关于QProcess.errorOccurred -这个信号PyQt的-5.8.2 可用 ,并已至少自PyQt的-5.3.2(这是我可以检查旧版本)。 The QProcess.error signal is obsolete , and should not be used in new code. QProcess.error信号已过时 ,不应在新代码中使用。

PPS: PPS:

PyQt5 is certainly not "still in development" (but PySide for Qt5 is). PyQt5当然不是“还在开发中”(但是Qt5的PySide是)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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