PDA

View Full Version : dirtyOnScreen() method of QWSServer is not working for my programme.



Ratheendrans
8th November 2010, 05:02
Hi All,

I am trying a scenario in which the user enters a value in the fields in a window and closes the it in a embedded system environment. I have to pop up a window only in the case the user has modified/edited any of the editable fields in the widow.

The editable screen is one of the stackedWidget of the QWidget instance.

Below is a snapshot of keypressEvent handler.
void CWidgetHandler::keyPressEvent ( QKeyEvent * event )
{
QList <QWSWindow*> topWin;
QWSServer * server = QWSServer::instance();
if (event->key()==Qt::Key_Escape)
{
MessageDialog objMessageDailog;
objMessageDailog.exec();
topWin=server->clientWindows();
if(topWin.at(1)->dirtyOnScreen().isEmpty())
printf("no changes done on screen \n");
else
printf("The screen is dirty\n");
}

the application always call the " printf("no changes done on screen \n");" even if te changes has been done.

kindly help me in fixing this issue.

Ratheendran