Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Clickable URL in About message box
Forum Updated to NodeBB v4.3 + New Features

Clickable URL in About message box

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 5.8k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    sjaacko
    wrote on last edited by
    #1

    Hi folks,
    In my application I have an About box. The code looks a bit like this.

    @
    QMessageBox::about(this, tr("About MyApp"),
    tr("Visit my www.website.com"));
    @

    I'd like the link to my website to be clickable so people can visit it.
    Is that possible? If I just put the <a > tag around it it is just a link but not clickable.

    Or: would be possible to create a menu item that says: "Visit webite" and when clicked the default browser is started and the website URL specified is loaded?

    Thanks!

    Sjaacko

    [EDIT: code formatting, please wrap in @-tags, Volker]

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #2

      Hi,

      Yes it is possible. There are different ways to implement it as a GUI. You can create a custom widget with QPushButton or QMessageBox with a OK button or something else.

      No matter which way you choose you can start the default web browser and load the url using QDesktopServices and QUrl. Check "this simple code snippet":http://developer.qt.nokia.com/wiki/How_to_Launch_Web_Browser for more info.

      Cheers,
      Leon

      http://anavi.org/

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sjaacko
        wrote on last edited by
        #3

        Thank you for this quick answer. I implemented in my application and it works just fine! Exactly the way I want it :-) Thanks so much!

        1 Reply Last reply
        0
        • L Offline
          L Offline
          leon.anavi
          wrote on last edited by
          #4

          Great :) I am glad that the provided link has helped you to solve the issue.

          http://anavi.org/

          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