當我點擊某個按鈕時,我想製作當前正在運行的應用程序的副本,例如Chromium瀏覽器。如何使用Qt從正在運行的實例「克隆」?
現在我使用:
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.
嘗試在應用程序的開始時添加一個日誌調用,也許它的開始並沒有變得很遠。 – 2012-02-12 13:08:55