PDA

View Full Version : Rendering Content Dynamically



nabeel
29th August 2013, 08:59
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???????
:( :(

wagmare
29th August 2013, 09:20
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/qtcore/signalsandslots.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 ..

Santosh Reddy
29th August 2013, 09:30
display the string in my output????
What is your output? QWidget/QLabel/QGraphicsView/QPushButton/terminal?

nabeel
29th August 2013, 09:32
Qwidget ,,,,

wagmare
29th August 2013, 09:37
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 .