def __init__(self, rootWidget): QtGui.QWidget.__init__(self, ctx.mainScreen) self.ui = Ui_connectionWidget() self.ui.setupUi(self) self.setStyleSheet(""" QFrame#mainFrame { background-image: url(:/gui/pics/transBlack.png); border: 1px solid #BBB; border-radius:8px; } QWidget#autoPartQuestion { background-image: url(:/gui/pics/trans.png); } """) self.rootWidget = rootWidget self.needsExecute = False self.connect(self.ui.buttonCancel, SIGNAL("clicked()"), self.hide) self.connect(self.ui.buttonConnect, SIGNAL("clicked()"), self.slotUseSelected) connections = getConnectionList() for package in connections.keys(): for connection in connections[package]: ci = ConnectionItem(self.ui.connectionList, str(connection), package) self.ui.connectionList.setCurrentRow(0) self.resize(ctx.mainScreen.size())