19 #include <QMessageBox> 28 if ( title.
isEmpty() ) title =
tr(
"Error" );
32 QMessageBox messageBox( QMessageBox::Critical,
"",
"" );
33 mIconLabel->setPixmap( messageBox.
iconPixmap() );
34 mSummaryTextBrowser->setOpenExternalLinks(
true );
35 mDetailTextBrowser->setOpenExternalLinks(
true );
36 mDetailTextBrowser->hide();
39 p.
setColor( QPalette::Base, Qt::transparent );
40 mSummaryTextBrowser->setPalette( p );
42 mDetailCheckBox->hide();
44 mSummaryTextBrowser->setText( mError.
summary() );
50 Qt::CheckState state = ( Qt::CheckState ) settings.
value(
"/Error/dialog/detail", 0 ).
toInt();
51 mDetailCheckBox->setCheckState( state );
67 mSummaryTextBrowser->hide();
68 mDetailTextBrowser->show();
69 mDetailCheckBox->show();
70 mDetailPushButton->hide();
77 settings.
setValue(
"/Error/dialog/detail", state );
void setColor(ColorGroup group, ColorRole role, const QColor &color)
void on_mDetailCheckBox_stateChanged(int state)
QString tr(const char *sourceText, const char *disambiguation, int n)
void setValue(const QString &key, const QVariant &value)
int toInt(bool *ok) const
QString summary() const
Short error description, usually the first error in chain, the real error.
QgsErrorDialog(const QgsError &theError, const QString &theTitle, QWidget *parent=nullptr, const Qt::WindowFlags &fl=QgisGui::ModalDialogFlags)
QVariant value(const QString &key, const QVariant &defaultValue) const
QgsError is container for error messages (report).
void on_mDetailPushButton_clicked()
QString message(QgsErrorMessage::Format theFormat=QgsErrorMessage::Html) const
Full error messages description.