How to render the content dynamically in QT...for eg if i get a string at a run time....i have to render it while running ...display the string in my output????
Can any one help me???????
How to render the content dynamically in QT...for eg if i get a string at a run time....i have to render it while running ...display the string in my output????
Can any one help me???????
http://qt-project.org/doc/qt-5.0/qtc...sandslots.html
u can use signals and slot for this mechanism ..
emit a signal when string is available along with string as a argument and in slot the string will be available and u can process what ever u want. ex: setText(string) in QTextEdit, QLabel etc ..
"Behind every great fortune lies a crime" - Balzac
nabeel (29th August 2013)
What is your output? QWidget/QLabel/QGraphicsView/QPushButton/terminal?display the string in my output????
When you know how to do it then you may do it wrong.
When you don't know how to do it then it is not that you may do it wrong but you may not do it right.
nabeel (29th August 2013)
Qwidget ,,,,
u need some specific text display QWidgets to display the string ex: QLabel QLineEdit . if strictly u want it to display in qwidget u have to override the paintEvent http://qt-project.org/search/tag/paintevent of QWidget and display the text using QPainter::drawText , which in turn is a hectic operation for a small task .
"Behind every great fortune lies a crime" - Balzac
nabeel (29th August 2013)
Bookmarks