0

I have designed a QMessagebox. In that box i have a check box "Don't show this message-box again". So,after clicking in this box messagebox should not appear from next time after launching gui. I have tried doing in this way -->

        msg = QtWidgets.QMessageBox()
        msg.setWindowTitle("What's New")
        msg.setWindowIcon(QtGui.QIcon(os.path.abspath(os.path.join(os.path.dirname(
            os.path.realpath(__file__)), 'gui_images', 'logo_icon.png'))))
        msg.setText(ui_helper.WHAT_IS_NEW)
        msg.move(500, 500)
        check_box = QtWidgets.QCheckBox("Don't show this again")
        msg.setCheckBox(check_box)
        # msg.exec_()
        state = check_box.isChecked()
        if state == Qt.Checked:
            pass
        else:
            msg.exec_()

This does not work. What is proper code / method to do it?

0 Answers0