Important: Please read the Qt Code of Conduct -

"Mailto:" Problem

  • Hi ,

    Im trying to write a mobile app for Android that opens a new default email message. There is a hyperlink in the body of the email that should display : ""

    My code is
    @ QDesktopServices::openUrl(QUrl(""));@

    My problem is that when the app is run, only part of the link is displayed. : "". All text after the "?" is not displayed. If I remove this "?", then all text is displayed.

    How can I solve this problem? Is this "?" a special character that I need to escape?

    Please help. Thanks!

  • I am not sure, but when I was programming in html, particularly wich PHP, when you want to create a link (blue words that you can clic on then) you create something like this @<a href="">Visit W3Schools</a>@ you need to manualy replace the '?' with ?amp. I dont remember why, but it is the way that the programm, or the script knows that it must place a '?'

  • Thanks for your reply. Your reply guided me to the correct answer.. For the interest of others:

    • It is not the '?' but the '&' following it, which was creating the problem. (maps?&daddr)
    • The '&' in the hyperlink gets misinterpreted by the mail client, so I encoded it as @% 26@ which solved this problem.

Log in to reply