how to restart my own qt application?

后端 未结 8 1781
再見小時候
再見小時候 2020-11-30 09:39

i just asking myself how to restart my own qt application?

Can somebody please show me an example?

8条回答
  •  甜味超标
    2020-11-30 10:16

    To restart application, try:

    #include 
    #include 
    
    ...
    
    // restart:
    qApp->quit();
    QProcess::startDetached(qApp->arguments()[0], qApp->arguments());
    

提交回复
热议问题