我正在我的程序中选择并加载一些大的 Dicom 文件。整个加载过程需要很长时间(取决于文件的数量,但如果文件很多,整个过程可能需要几分钟以上)。当文件上传正在进行时,我想显示一个“等待符号”或类似的东西。我搜索了它,但我没有得到任何确定的东西。
我的选择和上传部分的代码如下:
void MainWindow::showTheSelectedList()
{
QFileDialog * fileDialog = new QFileDialog(this);
fileDialog->setFileMode(QFileDialog::ExistingFiles);
QListView* list = fileDialog->findChild<QListView*>("listView");
if(list)
{
list->setSelectionMode(QAbstractItemView::MultiSelection);
}
QTreeView* tree = fileDialog->findChild<QTreeView*>();
if(tree)
{
tree->setSelectionMode(QAbstractItemView::MultiSelection);
}
if(fileDialog->exec())
{
if(fileDialog->selectedFiles().size()>0)
{
int listsize=stringList.size();
for(int i=0;i<listsize;i++)
{
// get the name of the file
// check if the file is dicom
// upload if the file is dicom
// after uploading, get the pixel data of that file
// use the pixel data and make a icon out of it
//then insert the icon in an a QTablewView
}
}
}
//show the QtableView
}
您能否指导我在上传部分运行时在哪里以及如何显示等待标志或符号?
谢谢