本文整理汇总了C++中QProgressBar::deleteLater方法的典型用法代码示例。如果您正苦于以下问题:C++ QProgressBar::deleteLater方法的具体用法?C++ QProgressBar::deleteLater怎么用?C++ QProgressBar::deleteLater使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QProgressBar
的用法示例。
在下文中一共展示了QProgressBar::deleteLater方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createProfile
void ProfileWizard::createProfile(int result)
{
if (_profile_edit->isComplete() )
{
bts::profile_config conf;
conf.firstname = _profile_edit->ui.first_name->text().toUtf8().constData();
conf.firstname = fc::trim( conf.firstname );
conf.middlename = _profile_edit->ui.middle_name->text().toUtf8().constData();
conf.middlename = fc::trim( conf.middlename );
conf.lastname = _profile_edit->ui.last_name->text().toUtf8().constData();
conf.lastname = fc::trim( conf.lastname );
conf.brainkey = _profile_edit->ui.brainkey->text().toUtf8().constData();
conf.brainkey = fc::trim( conf.brainkey );
std::string password = _profile_edit->ui.local_password1->text().toUtf8().constData();
std::string profile_name = conf.firstname + " " + conf.lastname;
auto app = bts::application::instance();
fc::thread* main_thread = &fc::thread::current();
QProgressBar* progress = new QProgressBar();
progress->setWindowTitle( "Creating Profile" );
progress->setMaximum(1000);
progress->resize( 640, 20 );
progress->show();
auto profile = app->create_profile(profile_name, conf, password,
[=]( double p )
{
main_thread->async( [=](){
progress->setValue( 1000*p );
qApp->sendPostedEvents();
qApp->processEvents();
if( p >= 1.0 ) progress->deleteLater();
} ).wait();
}
);
assert(profile != nullptr);
//store myself as contact
/*
std::string dac_id_string = _nym_page->_profile_nym_ui.keyhotee_id->text().toStdString();
bts::addressbook::wallet_contact myself;
myself.wallet_index = 0;
myself.first_name = conf.firstname;
myself.last_name = conf.lastname;
myself.set_dac_id(dac_id_string);
auto priv_key = profile->get_keychain().get_identity_key(myself.dac_id_string);
myself.public_key = priv_key.get_public_key();
profile->get_addressbook()->store_contact(myself);
//store myself as identity
bts::addressbook::wallet_identity new_identity;
static_cast<bts::addressbook::contact&>(new_identity) = myself;
profile->store_identity(new_identity);
bts::application::instance()->add_receive_key(priv_key);
*/
_mainApp.displayMainWindow();
}
}