PDA

View Full Version : QWidget displaying the previous screen



asmncl
1st July 2011, 09:23
Hello,

I built an application using Qt 4.6. Designed the app such that it would create the controls required, add it to a main widget and display the widget. when i click on any button in it, the same process would continue. I have arround 20 screens like this.

I am displaying the widget using
setCentralWidget(mainWidget);
This works fine in simulator. But when i test this app on a Nokia handset, after few minutes of testing i have faced a strange issue. Observed that previous screen is not getting cleared. I am able to view the previous screens in the background. Though application is not hanging, screen gets overlapped with all the screens i am navigating.

its a simple app, with a background image, few transparent images , thumbinals and pushbuttons.

Can any one please guide me what the problem is?

mvuori
1st July 2011, 10:33
If you just create new controls and and transparent elements to the widget, I don't see how the old ones would _not_ show through...

high_flyer
1st July 2011, 14:10
when i click on any button in it, the same process would continue. I have arround 20 screens like this.


But when i test this app on a Nokia handset, after few minutes of testing i have faced a strange issue.
It sounds like you are just allocating many controls, never free them, and probably the system is getting low on resources, which *could* lead to some undefined behavior if the system fails to deal with the lack of resources.
Having 20 screens sounds like a very bad UI design.
Maybe if you explain what you want to achieve, we might help you find a better way of doing it.