Beispiel #1
0
 def __init__(self, *args, **kwargs):
     QMessageBox.__init__(self, *args, **kwargs)
     chldn = self.children()
     scrll = QScrollArea(self)
     scrll.setWidgetResizable(True)
     grd = self.findChild(QGridLayout)
     lbl = QLabel(chldn[1].text(), self)
     lbl.setWordWrap(True)
     scrll.setWidget(lbl)
     scrll.setMinimumSize(400, 200)
     scrll.setStyleSheet('background:transparent; border:0;')
     grd.addWidget(scrll, 0, 1)
     chldn[1].setText('')
     self.exec_()
Beispiel #2
0
    def usage(self):
        """Show usage of the program.
        """

        msg = QMessageBox(self.parent)
        msg.setWindowTitle("Usage")
        #msg.setTitle("Usage of this GUI")
        text = QLabel(MessageText.usage_text)
        msg.setIcon(QMessageBox.Information)
        scroll = QScrollArea(msg)
        scroll.setWidgetResizable(True)
        grid = msg.findChild(QGridLayout)
        text.setWordWrap(True)
        scroll.setWidget(text)
        scroll.setMinimumSize(800, 400)
        scroll.setStyleSheet("""
            border: 1.5px solid black;
            padding: 15px;
            """)
        grid.addWidget(scroll, 0, 1)
        msg.exec_()