title: How to apply style sheet to a custom widget in PyQt
body: <pre><code># -*- coding: utf-8 -*-
  
  import sys
  from PyQt4.QtGui import *  
  from PyQt4.QtCore import * 
  
  class MainWindow(QWidget):
      def __init__(self):
          super(MainWindow, self).__init__()
  
          self.setFixedWidth(200)
          self.setFixedHeight(200)
  
          stylesheet = \
              ".QWidget {\n" \
              + "border: 20px solid black;\n" \
              + "border-radius: 4px;\n" \
              + "background-color: rgb(255, 255, 255);\n" \
              + "}"
          self.setStyleSheet(stylesheet)
  
  if __name__ == '__main__':
  
      app = QApplication(sys.argv)
      main = MainWindow()
      main.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>I want to add a border to a custom widget with style sheet, but the style sheet does not seem to work, anything wrong?</p>