How to open a txt file in the foreground above/infront of all other opened dir using qt api?
-
wrote on 31 Mar 2012, 09:38 last edited by
Hi All,
I want to launch/open a txt file when i am exiting from my qt app. To do that am using the below qt api
QDesktopServices::openUrl(QUrl(QLatin1String("file:///C:/myapp/releasenote.txt"), QUrl::TolerantMode));
But the issue is if some other folder is opened the file txt file is opened exactly behind of the opened dir or file.
How to fix this issue?
Is there any other api or setting required which will make this visible in front of other opened dirs.Regards,
Pradeep -
wrote on 31 Mar 2012, 12:27 last edited by
Maybe "startDetached":http://qt-project.org/doc/qt-4.8/qprocess.html#startDetached could help.
But I don't know how to get name of app which attached to .txt extension. -
wrote on 2 Apr 2012, 10:05 last edited by
Thanks for your reply. i dont want to use QProcess. Is there any other way how to make this possible.
-
wrote on 2 Apr 2012, 10:57 last edited by
Operating systems nowadays often prevent applications from doing window management tasks like these. You might run into such a limitation here...
-
wrote on 2 Apr 2012, 12:54 last edited by
Yes i have verified on windows xp and it works fine but on windows 7 this is an issue.
-
wrote on 2 Apr 2012, 13:00 last edited by
Probably little you can do about that, then. You could look into windows 7 API to see if you can do anything more, but Qt does not supply such functionality.
-
wrote on 4 Apr 2012, 09:49 last edited by
Ok, Thanks for your reply. then i need to check for windows api to do so.
1/7