Results 1 to 2 of 2

Thread: Allows HTML urls in QTableWidget and QLabel

  1. #1
    Join Date
    Jan 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Allows HTML urls in QTableWidget and QLabel

    Hello.
    Is it possible to allow HTML urls in QTableWidget ?

    And i have problem with urls in QLabel
    i put text
    Qt Code:
    1. <a href=http://somepage.pl/forum/temat/?id=2345>http://somepage.pl/forum/temat/?id=2345</a>
    To copy to clipboard, switch view to plain text mode 
    and setOpenExternalLinks to true but when i clicked on the link it was open without id value only
    Qt Code:
    1. http://somepage.pl/forum/temat/?id
    To copy to clipboard, switch view to plain text mode 
    What i do wrong ?

    PS. Sorry for my English but i`m from Poland

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Allows HTML urls in QTableWidget and QLabel

    You need to encode the url.

    The "=" character should be replaced by a html code (decimal ascii value)

    http://doc.qt.nokia.com/4.7/qurl.html

Similar Threads

  1. Replies: 1
    Last Post: 23rd January 2010, 13:16
  2. Replies: 1
    Last Post: 3rd December 2009, 10:15
  3. HTML-String in QTableWidget
    By wojtek in forum Qt Programming
    Replies: 1
    Last Post: 21st February 2008, 09:27
  4. Replies: 2
    Last Post: 14th January 2008, 18:09
  5. QLabel with HTML-style formatting docs?
    By Everall in forum Qt Programming
    Replies: 6
    Last Post: 7th February 2006, 20:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.