擅长:python、mysql、java
<p>我也有同样的问题,然后这样想:</p>
<pre><code>import PyQt.QtGui as qg
boxElements = self.MainWindowUI.groupBox.children()
radioButtons = [elem for elem in boxElements if isinstance(elem, qg.QRadioButton)]
for rb in radioButtons:
if rb.isChecked():
checkedOnRb = rb.text()
</code></pre>
<p>我喜欢你的解决方案。这是另一个使用findChildren的方法,这要感谢OP解决方案。在</p>
^{pr2}$