View Full Version : QT Operning files
shady-alaa
6th September 2012, 15:41
Hello ,
I am new to Qt creator and i want to know how to open a file located in the string variable "path" ?
Thank you.
high_flyer
6th September 2012, 16:09
Did you try the documentation?
shady-alaa
6th September 2012, 22:09
gooooooood i found it :)) , QUrl("path") .
ChrisW67
6th September 2012, 22:37
Your definition of "open a file" and mine are very different. Creating a URL doesn't do anything to the file. Have a look at QFile if you want to read the files contents in your program, or QDesktopServices::openUrl() if you want to launch whatever application would normally handle the file.
shady-alaa
7th September 2012, 06:43
coooool, it wooooorks, finally.. this function even opens web pages :D .. thank you
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.