私は15の防御を持っています。15 個のラジオボタン (p1、p2、p3.....p15) があります。QPush ボタンを 1 つ持っています。最初の定義を使用したい場合は、QPushButton の「p1」をクリックしてから、この定義を使用します。なぜ私はそれが必要なのですか?テキストを処理する必要があるため、テキストをテキスト編集で開き、処理する必要がありますが、ラジオボタンを使用して 1 つの定義のみを使用したいと考えています。どうすればできますか?
例えば:
self.radioButton_1 = QRadioButton(self.Processing)
self.radioButton_1.setGeometry(QRect(520, 200, 50, 22))
self.radioButton_1.setObjectName(_fromUtf8("radioButton_1"))
self.radioButton_1.setText(QApplication.translate("Form", "P1", None, QApplication.UnicodeUTF8))
self.processLineButton = QPushButton(self.Processing)
self.processLineButton.setGeometry(QRect(800, 100, 100, 37))
self.processLineButton.setText(QApplication.translate("None","Process", None, QApplication.UnicodeUTF8))
と
def example(exampless):
example = []
for exx in exampless:
es = re.findall("\.{3}!", exx)
if es:
example = example + [exx]
#endif
#endfor
self.TextProcess.setPlainText(example)