Results 1 to 6 of 6

Thread: QTextBrowser problem

  1. #1
    Join Date
    Feb 2007
    Posts
    39
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default QTextBrowser problem

    I've very strange problem while using QTextBrowser.
    My code:

    Qt Code:
    1. QString html = QString("<a href='www.google.com'><img src='banner1.png' height='60' width='468'></a>")
    2. TextBrowser->setHtml(html);
    To copy to clipboard, switch view to plain text mode 

    Image appears fine, when i click on it, the browser window is open and page loads ok.
    Problem is, when i pass my mouse cursor over the image it only switches to 'hand cursor' in the middle left of the image, when i pass cursor over the rest of the image (right part), mouse is 'normal cursor" and nothing happens if i click. Any clue about this? Thanks

  2. #2
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTextBrowser problem

    Quote Originally Posted by Mrdata View Post
    I've very strange problem while using QTextBrowser.
    My code:

    Qt Code:
    1. QString html = QString("<a href='www.google.com'><img src='banner1.png' height='60' width='468'></a>")
    2. TextBrowser->setHtml(html);
    To copy to clipboard, switch view to plain text mode 

    Image appears fine, when i click on it, the browser window is open and page loads ok.
    Problem is, when i pass my mouse cursor over the image it only switches to 'hand cursor' in the middle left of the image, when i pass cursor over the rest of the image (right part), mouse is 'normal cursor" and nothing happens if i click. Any clue about this? Thanks

    and nothing happens ?
    <a href='www.google.com'> rewrite to -> <a href='http://www.google.com/'>


    or build this ...
    http://ppk.ciz.ch/qt_c++/html_editor/_htmledit.tar.bz2

    open firefox , go to http://www.google.com select all, copy image text all, ....

    open htmledit && paste text image and so... firefox 2.2 +

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTextBrowser problem

    Quote Originally Posted by Mrdata View Post
    Problem is, when i pass my mouse cursor over the image it only switches to 'hand cursor' in the middle left of the image, when i pass cursor over the rest of the image (right part), mouse is 'normal cursor" and nothing happens if i click. Any clue about this?
    Could you verify if this happens with other images as well? Which exact Qt release do you use?

  4. #4
    Join Date
    Feb 2007
    Posts
    39
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTextBrowser problem

    Quote Originally Posted by wysota View Post
    Could you verify if this happens with other images as well? Which exact Qt release do you use?
    I'm using QT 4.2.3

    Yes i tried with different images, i also tried with jpg instead of png. what am i missing here?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTextBrowser problem

    I can't reproduce the error. It works fine for me although I use 4.3rc1.

  6. The following user says thank you to wysota for this useful post:

    Mrdata (24th May 2007)

  7. #6
    Join Date
    Feb 2007
    Posts
    39
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTextBrowser problem

    Can someone with version 4.2.3 confirm if they've the same problem or it's ok? Thanks.

Similar Threads

  1. QTextBrowser Problem
    By Cutey in forum Qt Programming
    Replies: 1
    Last Post: 19th January 2007, 10:19
  2. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  3. [QT4] QtextBrowser and image size (win)
    By sebgui in forum Qt Programming
    Replies: 0
    Last Post: 28th March 2006, 21:01
  4. Replies: 16
    Last Post: 7th March 2006, 15:57
  5. how to adjust sizes of QTextBrowser?
    By Pan Wojtas in forum Qt Programming
    Replies: 2
    Last Post: 7th February 2006, 22:25

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
  •  
Qt is a trademark of The Qt Company.