Facebook
From Gruff Lechwe, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 167
  1. class Widget(QWidget):
  2.     def __init__(self, parent):
  3.         super(Widget, self).__init__(parent)
  4.         self.interface()
  5.  
  6.     def interface(self):
  7.         hlay = QHBoxLayout()
  8.  
  9.         vlay = QVBoxLayout()
  10.         font = QComboBox()
  11.         font.addItem("12")
  12.  
  13.         type = QRadioButton("Times New Roman")
  14.         type2 = QRadioButton("Arial")
  15.         type3 = QRadioButton("Courier New")
  16.  
  17.  
  18.         vlay.addWidget(font)
  19.         vlay.addWidget(type)
  20.         vlay.addWidget(type2)
  21.         vlay.addWidget(type3)
  22.  
  23.         text = QTextEdit("Pole tekstowe")
  24.  
  25.         hlay.addLayout(vlay)
  26.         hlay.addWidget(text)
  27.  
  28.  
  29.         self.setLayout(hlay)
  30.         self.show()