Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. "Mailto:" Problem

"Mailto:" Problem

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GoodMorninSunshine
    wrote on last edited by
    #1

    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 : "http://maps.google.com/maps?&daddr=123"

    My code is
    @ QDesktopServices::openUrl(QUrl("mailto:development@bbb.com.au?subject=Test&body=http://maps.google.com/maps?&daddr=123"));@

    My problem is that when the app is run, only part of the link is displayed. : "http://maps.google.com/maps?". 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!

    1 Reply Last reply
    0
    • Y Offline
      Y Offline
      yobob2000
      wrote on last edited by
      #2

      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="http://www.mywebsite.com?43rfgq3gfq3g">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 '?'

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GoodMorninSunshine
        wrote on last edited by
        #3

        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.
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved