在PyQt4或PyQt5中有没有替代QVector的方法?

2024-03-28 18:47:37 发布

您现在位置:Python中文网/ 问答频道 /正文

我需要在PyQt4中使用Vector,但不幸的是,PyQt4不包括它:

rects = QVector(region.rects())
data = QVector();
for rect in rects.count():
  r = QRect(rect)
  data << r.x() << r.y() << r.width() << r.height()

Tags: inrectfordatacountwidthregionvector