我正在编写一个 qt 应用程序。我将使用 QdialogbuttonBox 显示带有取消按钮的进度对话框。我写在下面的代码
QProgressDialog progDlg;
//Hide close button
progDlg.setWindowFlags(progDlg.windowFlags());
progDlg.setWindowTitle( QString( tr("Please wait while operation is in progress")));
progDlg.setFixedWidth(300);
progDlg.setRange(0, 0);
progDlg.show();
auto *timer = new QTimer(this);
auto currentValue = 0;
progDlg.setValue(currentValue);
connect(timer, SIGNAL(timeout()), this, SLOT(updateProgressDialog()));
timer->start(100);//Start a Endless timer
QCoreApplication::processEvents();//Avoid UI freeze
if(progDlg.wasCanceled())
progDlg.setHidden(true);//Hide the dialog
我创建了一个 Qdialogbuttonbox,标题为“操作正在进行中请稍候”。我添加了中文翻译。它似乎不起作用。我不知道现在该怎么办
标题翻译不起作用