24 : QDialog( parent, fl )
28 connect( mDetailPushButton, &QPushButton::clicked,
this, &QgsErrorDialog::mDetailPushButton_clicked );
29 connect( mDetailCheckBox, &QCheckBox::stateChanged,
this, &QgsErrorDialog::mDetailCheckBox_stateChanged );
31 if ( title.isEmpty() )
32 setWindowTitle( tr(
"Error" ) );
34 setWindowTitle( title );
37 const QMessageBox messageBox( QMessageBox::Critical, QString(), QString() );
38 mIconLabel->setPixmap( messageBox.iconPixmap() );
39 mSummaryTextBrowser->setOpenExternalLinks(
true );
40 mDetailTextBrowser->setOpenExternalLinks(
true );
41 mDetailTextBrowser->hide();
43 QPalette p = palette();
44 p.setColor( QPalette::Base, Qt::transparent );
45 mSummaryTextBrowser->setPalette( p );
47 mDetailCheckBox->hide();
49 mSummaryTextBrowser->setText( mError.
summary() );
52 resize( width(), 150 );
55 const Qt::CheckState state = ( Qt::CheckState ) settings.
value( QStringLiteral(
"Error/dialog/detail" ), 0 ).toInt();
56 mDetailCheckBox->setCheckState( state );
57 if ( state == Qt::Checked )
58 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.