Dear all,
thank you very much for invaluable inputs.
I found that using
QUrl::fromLocalFile(...)
To copy to clipboard, switch view to plain text mode
is quite useful but on linux systems (, mine is ubuntu 11.04), it can't be used with urls like
www.qtcenter.org (web addresses)
www.qtcenter.org (web addresses)
To copy to clipboard, switch view to plain text mode
It does open with
QDesktopServices::openUrl(...)
To copy to clipboard, switch view to plain text mode
So after some search I came across
QUrl::fromUserInput(...)
To copy to clipboard, switch view to plain text mode
I have tested it on WinXP, Win7, Ubuntu 11.04, MacOSX with success. I have tried opening following Urls with it (successfully):
/home (It's a dir path)
/usr/local (It's a dir path)
/home/rupesh/Pictures/1.jpg (it's a file)
/home/rupesh/Pictures/1 2 3 4.jpg (it's a file, please note spaces in file name)
/home/rupesh/Pictures/1.pdf (it's a file)
/home/rupesh/Pictures/1 2 3 4.pdf (it's a file, please note spaces in file name)
http://www.microsoft.com
www.microsoft.com
By the way the code I wrote was
return QDesktopServices::openUrl( QUrl::fromUserInput( theUrl ));
Please give me a feedback if you use it and come across any issues.
Thank you
Rupesh
Bookmarks