Example #1
0
class MainWin(QtGui.QMainWindow, Ui_TheGlobalSquare):
    def __init__(self, *argv, **kwargs):
        super(MainWin, self).__init__(*argv, **kwargs)
        # super(Ui_MainWindow, self).__init__(*argv, **kwargs)
        self.setupUi(self)

        # We want the message list to scroll to the bottom every time we send or receive a new message.
        message_model = self.message_list.model()
        message_model.rowsInserted.connect(self.message_list.scrollToBottom)

        # Debug/demo stuff we will remove as functionality is implemented:
        self.showSquare_btn.clicked.connect(self.onDemoShowSquare)

    def onDemoShowSquare(self):
        # Keep a reference to it so it doesn't get destroyed
        self.square_dialog = SquareDialog()
        self.square_dialog.show()
Example #2
0
 def onDemoShowSquare(self):
     # Keep a reference to it so it doesn't get destroyed
     self.square_dialog = SquareDialog()
     self.square_dialog.show()