23   : QDialog( parent, fl )
    28   connect( checkBox, &QCheckBox::toggled, 
this, &QgsMessageViewer::checkBox_toggled );
    31     setAttribute( Qt::WA_DeleteOnClose );
    37   txtMessage->setTextInteractionFlags( Qt::TextBrowserInteraction );
    38   txtMessage->setOpenExternalLinks( 
true );
    43   txtMessage->setHtml( msg );
    48   txtMessage->setPlainText( msg );
    53   txtMessage->append( msg );
    69     QApplication::setOverrideCursor( Qt::ArrowCursor );
    71     QApplication::restoreOverrideCursor();
    81   setWindowTitle( title );
    86   checkBox->setText( text );
    91   checkBox->setVisible( visible );
    96   checkBox->setCheckState( state );
   101   return checkBox->checkState();
   106   mCheckBoxQgsSettingsLabel = label;
   110 void QgsMessageViewer::checkBox_toggled( 
bool toggled )
   113   if ( !mCheckBoxQgsSettingsLabel.isEmpty() )
   116     if ( checkBox->checkState() == Qt::Checked )
   117       settings.
setValue( mCheckBoxQgsSettingsLabel, 
false );
   119       settings.
setValue( mCheckBoxQgsSettingsLabel, 
true );
 MessageType
message can be in plain text or in html format 
 
This class is a composition of two QSettings instances: 
 
Qt::CheckState checkBoxState()
 
void setTitle(const QString &title) override
Sets title for the messages. 
 
void setMessageAsHtml(const QString &msg)
 
void setCheckBoxState(Qt::CheckState state)
 
void setMessageAsPlainText(const QString &msg)
 
void appendMessage(const QString &message) override
message to be appended to the current text 
 
void showMessage(bool blocking=true) override
display the message to the user and deletes itself 
 
void setMessage(const QString &message, MessageType msgType) override
Sets message, it won't be displayed until. 
 
void setCheckBoxText(const QString &text)
 
void setCheckBoxQgsSettingsLabel(const QString &label)
 
void setValue(const QString &key, const QVariant &value, QgsSettings::Section section=QgsSettings::NoSection)
Sets the value of setting key to value. 
 
QgsMessageViewer(QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags, bool deleteOnClose=true)
 
static void enableAutoGeometryRestore(QWidget *widget, const QString &key=QString())
Register the widget to allow its position to be automatically saved and restored when open and closed...
 
void setCheckBoxVisible(bool visible)