updating text in QTextEdit [SOLVED]
Hi
I want to update the text in a QTextEdit upon the occurance of a specific event. Following is the snapshot of my application
Code:
QTextEdit *metaDataText;
// this is the text box to be updated
Window
::Window(QWidget *parent
) : QWidget(parent
) { // constructor for the main window class metaDataText
= new QTextEdit;
// initializing the text box metaDataText->setText(MetaData::returnMetaData()); // puttin in initial values
}
I want to display when the text in the MetaData class changes.
So when the text changes in the MetaData class, a signal (triggerMetaDataUpdate) is issued, for which a slot is present in the window class as given below:
Code:
void Window::triggerMetaDataUpdate(){ // slot for the signal
metaDataText->setText(MetaData::returnMetaData()); // call to update, which does not update:(
update();
}
but this thing does not update the text in the QTextEdit.
can someone please help me do this correctly?
thanks
Re: updating text in QTextEdit
Can you verify that the slot indeed gets called and that MetaData::returnMetaData() returns changed data?
Re: updating text in QTextEdit
its solved. sorry for bothering.
there was some error in receiving the signal.
regards
Re: updating text in QTextEdit
thanks wysota
you are right on THE TARGET.
this was the matter that took me soo long :(
thanks for help