PDA

View Full Version : Main UI Freezes on QFileDilog is up



navi1084
29th April 2010, 07:18
Hi,
I am developing a app which displays continuous data from the external device using QTcpSocket. This data's are displayed either in text controls or in image format(if it is image). my application has the facility to save the data which is recieved.

Data's are updated properly in the controls when the app is up. But if i open the saveToFile (Using QFileDialog:: getSaveFileName()), all the main app's data will freeze. I found that data's are recievd and processed when SaveToFile() dialog is opened. but updating in controls getting freezed. when i close the SaveToFile() dialog, data's prperly updated in control.

Can anyone tellme why it is like this?? Is there any solution to resolve???

navi1084
29th April 2010, 07:23
I further noticed that, since i am drawing image too, the data's will not update() if i call update(). But if i call repaint() all the data's in the controls, as well as image in the widget is updated.

Can you please tell me which function is blocking from drawing(calling paintEvent()) when modal dialog is executed on the top of main UI.

Kumosan
29th April 2010, 09:13
You are working on Windows? According to docs:


On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers,

navi1084
29th April 2010, 10:50
Is there anyway to avoiding the freeze????

Kumosan
29th April 2010, 10:54
Is there anyway to avoiding the freeze????

If it really is this problem, you might want to instantiate and configure your file dialog 'manually' and not use the convenient static function.