Rev | Line | |
---|
[956] | 1 | from PyQt4.QtCore import *
|
---|
| 2 | from PyQt4.QtGui import *
|
---|
| 3 | from PyQt4 import QtCore, QtGui
|
---|
| 4 | from PyQt4.QtWebKit import *
|
---|
| 5 |
|
---|
| 6 |
|
---|
| 7 |
|
---|
| 8 |
|
---|
| 9 | import Ui_fetchDCdialog
|
---|
| 10 |
|
---|
| 11 | class FetchDCDialog(QDialog,Ui_fetchDCdialog.Ui_fetchDCdialog ):
|
---|
| 12 | def __init__(self, parent = None, datacenterlist = []):
|
---|
| 13 | super(FetchDCDialog, self).__init__(parent)
|
---|
| 14 | self.setupUi(self)
|
---|
| 15 | self.setDatacenterlist(datacenterlist)
|
---|
| 16 |
|
---|
| 17 | def setDatacenterlist(self,datacenterlist):
|
---|
| 18 | self.listWidget.addItems(datacenterlist)
|
---|
| 19 |
|
---|
| 20 |
|
---|
| 21 | if __name__ == "__main__":
|
---|
| 22 | m={}
|
---|
| 23 | import sys
|
---|
| 24 | app = QApplication(sys.argv)
|
---|
| 25 | dialog = FetchDCDialog(datacenterlist=['DC1','DC2'])
|
---|
| 26 | dialog.show()
|
---|
| 27 | app.exec_() |
---|
Note:
See
TracBrowser
for help on using the repository browser.