diff options
Diffstat (limited to 'test/progressbardark/MainWindow.cpp')
-rw-r--r-- | test/progressbardark/MainWindow.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/progressbardark/MainWindow.cpp b/test/progressbardark/MainWindow.cpp new file mode 100644 index 0000000..07939bc --- /dev/null +++ b/test/progressbardark/MainWindow.cpp @@ -0,0 +1,32 @@ +#include "MainWindow.h" +#include "ui_MainWindow.h" +#include <sys/stat.h> +#include <iostream> +#include <dirent.h> +#include <stdio.h> + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow), + progressBarDark(new ProgressBarDark) +{ + ui->setupUi(this); + ui->verticalLayout->addWidget(progressBarDark); + connect(&treeTimer,&QTimer::timeout,this,&MainWindow::create); + treeTimer.start(100); +} + +MainWindow::~MainWindow() +{ + delete ui; +} + +void MainWindow::create() +{ + int val=progressBarDark->value(); + if(val>=100) + val=0; + else + val++; + progressBarDark->setValue(val); +} |