Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
QProgressBar 可以作为忙碌模式或百分比模式工作。
但我想展示两者!
在我的应用程序中,有时(并非总是)只需 1% 的更改就需要很长时间。
所以我想在显示百分比的同时显示某种繁忙的指示器效果。
我怎样才能做到这一点?你有什么主意吗?
您可以使用以下方法更改鼠标光标:
QApplication::setOverrideCursor(Qt::WaitCursor);
但别忘了恢复旧的,一旦你完成
QApplication::restoreOverrideCursor();
或者您可以添加第二个更精确的进度条