[Qt-interest] startDetached not working for standalone prog

Jason H scorp1us at yahoo.com
Tue Aug 30 18:24:29 CEST 2011


My knee-jerk reaction is to say getOctavePath() is not working the same. Are your relying on an environment variable and not set it?

You always compile it. Here's what to try:
Run in creator (Debug) I assume this works?
Run in creator (Release) I assume this works?
Run outside creator (Debug) I assume this fails?
Run outside creator (Release) I assume this fails?



________________________________
From: Doug Stewart <doug.dastew at gmail.com>
To: Qt Interest <qt-interest at qt.nokia.com>
Sent: Tuesday, August 30, 2011 12:13 PM
Subject: [Qt-interest] startDetached not working for standalone prog


 
QProcess*process=newQProcess();
/*Mydadwantsthistostartdetached,sothatmanycanbeopenatthe
*sametime.
*/
process->startDetached(m_system->getOctavePath(),QStringList()<<fileName);


With this code It  sort of works the way the doc states. 
   
   When I run it from Qtcreator It starts a new window with octave running in the window, and I can start many more of these which is what I want.
   When I close my C++ program then all these separate windows close.
 
  When I compile to an executable and run it, the new window gets started but then immediately closes. Not what I want!!!

Why the difference between running from the IDE and running from a compiled executable?? 

Doug
-- 

DAS
https://linuxcounter.net/user/206392.html

_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110830/4220bb3f/attachment.html 


More information about the Qt-interest-old mailing list