Closed ctriantaf closed 11 years ago
Just use Qt.openLinkExternally
(or something like that, not sure on the exact function name).
To open links when clicking on them in a text view, you should be able to implement a signal handler called something like onLinkActivated
(typing from memory again, so no guarantees that's exactly correct).
I don't have the links in a textview.. Qt.openUrlExternally doesn't work.
gvfs-open: file:///media/Files/UbuntuTouchDevelopment/CNotes/components/www.google.com: error opening location: Error when getting information for file '/media/Files/UbuntuTouchDevelopment/CNotes/components/www.google.com'
Are you missing the http://
or https://
part from the start of the link?
Yes. How I can know if a link needs http:// or https:// or it doesn't matter ? Because if you ask me to right down a link I'll never write http:// or https:// before www
I never would write that down either. I guess openUrlExternally
defaults to using open it as a local file. What you could do is write a wrapper function that checks to see if you have ://
at the start and if not, adds http://
to the start. That way you wouldn't need it write it.
Thats what I'll do probably... If you have time can you help me with something else?
I need to open the default browser when the user clicks on a link. I can't do it now because I don't think that a thing like Intent on android exists for Ubuntu touch at the moment.