singleShot
qt使用QMetaObject::invokeMethod异步调用或QTimer::singleShot解决很久才能显示界面的问题
https://blog.csdn.net/weixin_43935474/article/details/124922897 // Load(); // QMetaObject::invokeMethod(this,"Load",Qt::QueuedConnection);//无参数,Queued ......
QT 定时器QTimer::singleShot()用法
用法如下: 1 //参数:(定时时间,接受者,槽函数) 2 QTimer::singleShot(1000,this,[=]{ 3 //想要执行的代码 4 qDebug() << "hello world" ; 5 }); ......