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. How to capture Qlabel link text and redirect it to my use
Forum Update on Monday, May 27th 2025

How to capture Qlabel link text and redirect it to my use

Scheduled Pinned Locked Moved General and Desktop
2 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.
  • U Offline
    U Offline
    umen242
    wrote on last edited by
    #1

    Hello
    i have simple QLable that holds html link , now i need to be able to detect that user click on the link
    and do something , and prevent the link to open in external browser .
    where to start ?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      Set "QLabel::openExternalLinks":http://qt-project.org/doc/qt-4.8/qlabel.html#openExternalLinks-prop to false and connect to the "QLabel::linkActivated()"::http://qt-project.org/doc/qt-4.8/qlabel.html#linkActivated signal.

      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