Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8310441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:27:41+00:00 2026-06-08T19:27:41+00:00

I am trying to display some html code in a QLabel. While the QLabel

  • 0

I am trying to display some html code in a QLabel. While the QLabel renders the html properly, the hyper link is actually not working and the image links just produce a missing icon picture rather than showing the image itself.
I am guessing that this is a limitation of QLabel and I may need to resort to QWebView, but just wanted to check if I’m missing something?!

Here is an example:

import sys
from PySide.QtGui import *

app = QApplication([])

label = QLabel()
label.setText('''<p><a href="http://www.google.com">"Go to Google"</a></p>
<p><img src="http://www.google.co.nz/logos/2012/field_hockey-2012-hp.jpg"/></p>
<p><span style="font-size: 17px;"><br /></span></p>''')

label.show()
sys.exit(app.exec_())
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T19:27:43+00:00Added an answer on June 8, 2026 at 7:27 pm

    QLabel is not a web browser, although it can display rich text using a subset of HTML markup. See the documentation.

    If you want something to happen when the link is clicked, you need to use the linkActivated() signal. Or you can use the openExternalLink property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to display some message in span. but it is not working.
I'm trying to display some HTML files that have code samples, surrounded by codeblock
I'm trying to display some large images with HTML img tags. At the moment
I received the error while trying to display some variable like so: echo id
I'm trying to implemet a scrollable Text view (not editable) that display some help
Please look at my code. I am trying to display some dynamic customers in
I'm trying to display a png image on a <button> element in HTML. The
When trying to use the code presented here link text I ran into some
I am trying to display some html embedding a SWF object using javascript. The
I'm very new to HTML/CSS and I'm trying to display some text as like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.