本文整理汇总了C++中QProgressBar::hide方法的典型用法代码示例。如果您正苦于以下问题:C++ QProgressBar::hide方法的具体用法?C++ QProgressBar::hide怎么用?C++ QProgressBar::hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QProgressBar
的用法示例。
在下文中一共展示了QProgressBar::hide方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onRemoveLabel
void Progression::onRemoveLabel(QString name)
{
qDebug() << "trying to remove label and progress bar for :" << name;
for(int i = 0; i < vbl->count(); i++)
{
QLayoutItem* item = vbl->itemAt(i);
QWidget* widget = item->widget();
if (widget) {
QLabel *label = qobject_cast<QLabel *>(widget);
if(label and label->objectName() == name )
{
label->hide();
vbl->removeItem(item);
qDebug() << "Remove Label";
i--;
}
QProgressBar * pb = qobject_cast<QProgressBar *>(widget);
if(pb and pb->objectName() == name)
{
pb->hide();
vbl->removeItem(item);
qDebug() << "Remove Progbar";
i--;
}
}
}
this->adjustSize();
}
示例2: onLoadFinished
void BrowserView::onLoadFinished(bool ok)
{
if (ok) {
QProgressBar* bar = Sequencer::instance()->getProgressBar();
bar->setValue(100);
bar->hide();
getMainWindow()->showMessage(QString());
}
isLoading = false;
}
示例3: getfileTotal
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->textBrowser->setFont(QFont("Monospace",11));
ui->textBrowser->setLineWrapMode(QTextEdit::NoWrap);
updater->moveToThread(pthread);
fileTotal->moveToThread(fthread);
//User selects directory, or action
connect(this,SIGNAL(userSelect(QString)),updater,SLOT(action(QString)));
connect(this,SIGNAL(selectDir(QString)),updater,SLOT(selectDir(QString)));
connect(this,SIGNAL(selectDir(QString)),fileTotal,SLOT(selectDir(QString)));
//Returning from Worker Thread
connect(updater,SIGNAL(Finished(QString)),this,SLOT(action(QString)));
//Clean up threads
connect(updater,SIGNAL(close()),pthread,SLOT(quit()));
connect(pthread, SIGNAL(finished()), updater, SLOT(deleteLater()));
connect(fileTotal,SIGNAL(close()),fthread,SLOT(quit()));
connect(fthread,SIGNAL(finished()),fileTotal,SLOT(deleteLater()));
//Start Thread(s)
pthread->start();
fthread->start();
//Get number of files in directory for progress bar
//connect(this,SIGNAL(getfileTotal()),updater,SLOT(getfileTotal()));
connect(this,SIGNAL(getfileTotal(QString)),fileTotal,SLOT(getfileTotal(QString))); //request from main thread
connect(fileTotal,SIGNAL(finished(int)),updater,SLOT(getfileTotal(int))); //transfer total from getfiletotal object to worker object
connect(updater,SIGNAL(getfileTotal(QString)),fileTotal,SLOT(getfileTotal(QString))); //request from updater
connect(updater,SIGNAL(displayFileTotal(int)),this,SLOT(displayFileTotal(int)));
connect(fileTotal,SIGNAL(finished(int)),this,SLOT(enableButton()));
//Create ProgressBar
QProgressBar *bar = new QProgressBar(ui->statusBar);
ui->statusBar->addWidget(bar);
bar->setRange(0,100);
bar->setValue(0);
bar->hide();
connect(updater,SIGNAL(percentChanged(int)),bar,SLOT(setValue(int)));
connect(updater,SIGNAL(percentChanged(int)),bar,SLOT(show()));
connect(this,SIGNAL(hidebar()),bar,SLOT(hide()));
//fileTotal->getfileTotal();
emit getfileTotal(dirSelect);
ui->pushButton->setEnabled(false);
//TABLE FUNZ
QShortcut *shortcut = new QShortcut(QKeySequence("Ctrl+C"), this);
connect(shortcut,SIGNAL(activated()),this,SLOT(on_actionCopy_triggered()));
// ui->tableWidget->setColumnCount(3);
// ui->tableWidget->setRowCount(100);
// ui->tableWidget->setHorizontalHeaderLabels(QStringList() << "File" << "Hash" << "Check");
// ui->tableWidget->horizontalHeader()->setStretchLastSection(true);
// ui->tableWidget->horizontalHeader()->setSectionResizeMode(1,QHeaderView::Stretch);
}