Results 1 to 4 of 4

Thread: How to use the TEXT_BROWER to setfocus on the target text?

  1. #1
    Join Date
    Jan 2011
    Posts
    40
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default How to use the TEXT_BROWER to setfocus on the target text?

    I use the TEXT_BROWER to show the rich text of html.But there is no anchor in the html.I have to setfocus on the selected text .So how to solve it?
    Do I need to use the find function and write a class by myself?Please give some tips.Thx.

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

    Default Re: How to use the TEXT_BROWER to setfocus on the target text?

    Hmm... but seriously, what are you talking about?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2011
    Posts
    40
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to use the TEXT_BROWER to setfocus on the target text?

    I want to make a test program that there is a lot of questions you need to answer.The questions is in the html file.I want to make that : if you answer the no.1 question, then the question id moved next when you finished the answer.I use the text_browser to echo the html.But I don't know how to move the id automatically.

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

    Default Re: How to use the TEXT_BROWER to setfocus on the target text?

    What is TEXT_BROWSER? What is 'id'? What do you mean 'move' it? And where? You wish to scroll the view to the beginning of the next question that is displayed in a QTextBrowser? If so then what's the problem?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. How to setFocus to QMenuBar programatically?
    By ticvitanic in forum Qt Programming
    Replies: 0
    Last Post: 2nd July 2010, 15:58
  2. setFocus() on Lineedit
    By qtuser20 in forum Qt Programming
    Replies: 1
    Last Post: 26th February 2010, 18:54
  3. setFocus problem
    By roxton in forum Qt Programming
    Replies: 3
    Last Post: 12th February 2009, 05:41
  4. QLineEdit setFocus
    By bunjee in forum Qt Programming
    Replies: 4
    Last Post: 24th April 2008, 16:22
  5. setfocus working?
    By mahe2310 in forum Qt Programming
    Replies: 8
    Last Post: 10th March 2006, 02:45

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.