MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui->setupUi(this);
//then add all the items from a file to the model
tableView = new FreezeTableWidget(model);
ui->centralWidget->setLayout(boxLayout);
ui->centralWidget->layout()->addWidget(tableView);
void MainWindow::updateSearch()
{
myprogressDialog *progress = new myprogressDialog;
progress->setMinimum(0);
progress->setMaximum(100);
//progress->setValue(50);
progress->show();
//hide all the row that do not contain the search word
for (int i=1;i<3000;i++)
if(tableView->isRowHidden(i))tableView->showRow(i);
QList<int> searchInUse;
for (int i=0;i<14;i++)
{
if (!model->index(0,i).data().toString().isEmpty())
{
searchInUse.append(i);
}
}
progress->hide();
//myprogressDialog.cpp which is mainly a rotation form
graph->setFrameStyle(0);
graph->setScene(scene);
scene->setSceneRect(-100,-100,200,200);
waitD = new waitDisplay();
scene->addItem(waitD);
connect(timer, SIGNAL(timeout()), scene,SLOT(update()));
timer->start(20);
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
model = new QStandardItemModel(3000,15,this);
//then add all the items from a file to the model
tableView = new FreezeTableWidget(model);
ui->centralWidget->setLayout(boxLayout);
ui->centralWidget->layout()->addWidget(tableView);
connect(model,SIGNAL(dataChanged(QModelIndex,QModelIndex)),this,SLOT(updateSearch()));
void MainWindow::updateSearch()
{
myprogressDialog *progress = new myprogressDialog;
progress->setMinimum(0);
progress->setMaximum(100);
//progress->setValue(50);
progress->show();
//hide all the row that do not contain the search word
for (int i=1;i<3000;i++)
if(tableView->isRowHidden(i))tableView->showRow(i);
QList<int> searchInUse;
for (int i=0;i<14;i++)
{
if (!model->index(0,i).data().toString().isEmpty())
{
searchInUse.append(i);
}
}
progress->hide();
//myprogressDialog.cpp which is mainly a rotation form
scene = new QGraphicsScene(this);
graph = new QGraphicsView(this);
graph->setFrameStyle(0);
graph->setScene(scene);
scene->setSceneRect(-100,-100,200,200);
waitD = new waitDisplay();
timer = new QTimer(this);
scene->addItem(waitD);
connect(timer, SIGNAL(timeout()), scene,SLOT(update()));
timer->start(20);
To copy to clipboard, switch view to plain text mode
Bookmarks