Re: display in text browser
You need to convert it from a number to a string.
Check out the QString documentation, specifically something like QString::number or the QString arg(...) function.
Re: display in text browser
Thanks for ur response. But I cant able to figure out the problem. So if possible can you please edit my code
Re: display in text browser
'fromStdString' is static method, so you use it like so:
Re: display in text browser
Quote:
Originally Posted by
squidge
'fromStdString' is static method, so you use it like so:
Great it worked. Now i want to display results in text browser. But the problem I am facing is text browser display only the last result so can you please tell me how to populate all results(each result per line) in populate. How to integrate text browser with scroll bar. Tanx in advance
Re: display in text browser
Sorry, I thought second was a number (seconds).
Re: display in text browser
Quote:
Originally Posted by
mecrazycoder
But the problem I am facing is text browser display only the last result so can you please tell me how to populate all results(each result per line) in populate. How to integrate text browser with scroll bar. Tanx in advance
The documentation for QTextBrowser is at http://doc.trolltech.com/4.7/qtextbrowser.html, and you can find all its methods here. Also, since QTextBrowser inherits QTextEdit, you can also use the methods in http://doc.trolltech.com/4.7/qtextedit.html.
Anyway, setText() removes old text before adding new ones. To add text without removing the old ones, use append().
If I'm not mistaken, the QTextBrowser should automatically have a scroll bar.
Re: display in text browser
Thank you all for wonderful guidance