23 : QDialog( parent, fl )
27 connect( mDetailPushButton, &QPushButton::clicked,
this, &QgsErrorDialog::mDetailPushButton_clicked );
28 connect( mDetailCheckBox, &QCheckBox::stateChanged,
this, &QgsErrorDialog::mDetailCheckBox_stateChanged );
30 if ( title.isEmpty() )
31 setWindowTitle( tr(
"Error" ) );
33 setWindowTitle( title );
36 const QMessageBox messageBox( QMessageBox::Critical, QString(), QString() );
37 mIconLabel->setPixmap( messageBox.iconPixmap() );
38 mSummaryTextBrowser->setOpenExternalLinks(
true );
39 mDetailTextBrowser->setOpenExternalLinks(
true );
40 mDetailTextBrowser->hide();
42 QPalette p = palette();
43 p.setColor( QPalette::Base, Qt::transparent );
44 mSummaryTextBrowser->setPalette( p );
46 mDetailCheckBox->hide();
48 mSummaryTextBrowser->setText( mError.
summary() );
51 resize( width(), 150 );
54 const Qt::CheckState state = ( Qt::CheckState ) settings.
value( QStringLiteral(
"Error/dialog/detail" ), 0 ).toInt();
55 mDetailCheckBox->setCheckState( state );
56 if ( state == Qt::Checked )
57 mDetailPushButton_clicked();
QgsErrorDialog(const QgsError &error, const QString &title, QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
Constructor for QgsErrorDialog.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.