当我单击某个按钮时,我想复制当前正在运行的应用程序,例如 Chromium 浏览器。
现在我正在使用:
QProcess::startDetached( QApplication::applicationFilePath() );
但这不是cloning
来自正在运行的应用程序。
编辑
我试图 fork() ,并得到一个 X11 错误:
XX: Fatal IO error: client killed
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
RenRenPhotoFetch: ../../src/xcb_io.c:273: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.