本文整理汇总了C++中QCheckBox::deleteLater方法的典型用法代码示例。如果您正苦于以下问题:C++ QCheckBox::deleteLater方法的具体用法?C++ QCheckBox::deleteLater怎么用?C++ QCheckBox::deleteLater使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QCheckBox
的用法示例。
在下文中一共展示了QCheckBox::deleteLater方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShowUIOKDoNotShowOption
bool DialogMsg::ShowUIOKDoNotShowOption( const QString& title,const QString& msg )
{
QCheckBox * checkBox = new QCheckBox( tr( "do not show this dialog again" ),this ) ;
this->setFixedSize( 270,110 ) ;
checkBox->setGeometry( 30,40,251,31 ) ;
m_ui->label->setGeometry( 10,10,251,31 ) ;
m_ui->label->setFixedSize( m_ui->label->size() ) ;
m_ui->pbOk->setGeometry( 100,70,75,31 ) ;
m_ui->pbYes->setHidden( true ) ;
m_ui->pbNo->setHidden( true ) ;
m_ui->pbOk->setHidden( false ) ;
this->HideLabels() ;
this->ShowUI( title,msg ) ;
bool st = checkBox->isChecked() ;
checkBox->deleteLater() ;
return st ;
}
示例2: showQtVersionWarning
void Notepadqq::showQtVersionWarning(bool showCheckBox, QWidget *parent)
{
QSettings settings;
QString dir = QDir::toNativeSeparators(QDir::homePath() + "/Qt");
QString altDir = "/opt/Qt";
QMessageBox msgBox(parent);
msgBox.setWindowTitle(QCoreApplication::applicationName());
msgBox.setIcon(QMessageBox::Warning);
msgBox.setText("<h3>" + QObject::tr("You are using an old version of Qt (%1)").arg(qVersion()) + "</h3>");
msgBox.setInformativeText("<html><body>"
"<p>" + QObject::tr("Notepadqq will try to do its best, but <b>some things will not work properly</b>.") + "</p>" +
QObject::tr(
"Install a newer Qt version (≥ %1) from the official repositories "
"of your distribution.<br><br>"
"If it's not available, download Qt (≥ %1) from %2 and install it to \"%3\" or to \"%4\".").
arg("5.3").
arg("<nobr><a href=\"http://qt-project.org/\">http://qt-project.org/</a></nobr>").
arg("<nobr>" + dir + "</nobr>").
arg("<nobr>" + altDir + "</nobr>") +
"</body></html>");
QCheckBox *chkDontShowAgain;
if (showCheckBox) {
chkDontShowAgain = new QCheckBox();
chkDontShowAgain->setText(QObject::tr("Don't show me this warning again"));
msgBox.setCheckBox(chkDontShowAgain);
}
msgBox.exec();
if (showCheckBox) {
settings.setValue("checkQtVersionAtStartup", !chkDontShowAgain->isChecked());
chkDontShowAgain->deleteLater();
}
}