Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente | Prochaine révision Les deux révisions suivantes | ||
qradiobutton_pyqt4 [2010/09/24 19:40] tyrtamos |
qradiobutton_pyqt4 [2010/09/24 20:06] tyrtamos |
||
---|---|---|---|
Ligne 36: | Ligne 36: | ||
def __init__(self, | def __init__(self, | ||
super(Fenetre, | super(Fenetre, | ||
+ | self.setWindowTitle(" | ||
# créer les 3 radioboutons | # créer les 3 radioboutons | ||
- | self.radioButton_1 = QtGui.QRadioButton(self) | + | |
+ | | ||
self.radioButton_1.setText(u" | self.radioButton_1.setText(u" | ||
- | self.radioButton_2 = QtGui.QRadioButton(self) | + | self.radioButton_2 = QtGui.QRadioButton(self.groupBox) |
self.radioButton_2.setText(u" | self.radioButton_2.setText(u" | ||
- | self.radioButton_3 = QtGui.QRadioButton(self) | + | self.radioButton_3 = QtGui.QRadioButton(self.groupBox) |
self.radioButton_3.setText(u" | self.radioButton_3.setText(u" | ||
| | ||
Ligne 58: | Ligne 60: | ||
# positionnement des widgets dans la fenêtre | # positionnement des widgets dans la fenêtre | ||
posit = QtGui.QGridLayout() | posit = QtGui.QGridLayout() | ||
+ | posit.addWidget(self.groupBox, | ||
posit.addWidget(self.radioButton_1, | posit.addWidget(self.radioButton_1, | ||
posit.addWidget(self.radioButton_2, | posit.addWidget(self.radioButton_2, |