示例#1
0
void
TomahawkApp::onShutdownDelayed()
{
    QProgressDialog* d = new QProgressDialog( tr( "Tomahawk is updating the database. Please wait, this may take a minute!" ), QString(),
                                              0, 0, 0, Qt::Tool
                                              | Qt::WindowTitleHint
                                              | Qt::CustomizeWindowHint );
    d->setModal( true );
    d->setAutoClose( false );
    d->setAutoReset( false );
    d->setWindowTitle( tr( "Tomahawk" ) );

#ifdef Q_OS_MAC
    d->setAttribute( Qt::WA_MacAlwaysShowToolWindow );
#endif
    d->show();
}