Source

qtwsgi / step1.py

#! /usr/bin/env python
# -*- coding: utf-8 -*-

import sys

from PySide import QtCore, QtNetwork, QtGui

class QWSGILabel(QtGui.QLabel):
    def __init__(self, text, parent=None):
        super(QWSGILabel, self).__init__(text, parent=parent)

class QHttpWidget(QtGui.QWidget):
    def __init__(self, parent=None):
        super(QHttpWidget, self).__init__(parent=parent)
        self.setLayout(QtGui.QVBoxLayout(self))

        # Create label instance
        qwsgilabel = QWSGILabel("Hello World!", parent=self)
        self.layout().addWidget(qwsgilabel)

if __name__ == '__main__':
    app = QtGui.QApplication(sys.argv)
    window = QHttpWidget()
    window.show()
    sys.exit(app.exec_())