PDA

View Full Version : QMdiArea/SubWindow issue...



b1
1st September 2009, 07:23
G'Day,

I have a strange problem with a widget not being painted correctly. Note the greyed out area bottom left and top right. (See attached image). When a particular data set is selected form the "search for jobs" window, the "job details" window is opened. The attached image shows the resultant display. If I change applications and return or minimize/maximize the "job details" window it redraws correctly. I tried adding update() and repaint() and it improves the situation but still leaves the bottom plainTextEdit with display errors. This happens on both windows and Linux.

Any thoughts would be appreciated....

The code is as follows:


diswin = new DisplayJob;
swDisplayForm = new QMdiSubWindow;
swDisplayForm->setWidget( diswin );
workspace->addSubWindow(swDisplayForm);
swDisplayForm->setAttribute(Qt::WA_DeleteOnClose);
connect( diswin->pushButton_2, SIGNAL( clicked() ), swDisplayForm, SLOT( close() ) );
connect( diswin->pushButton_3, SIGNAL( clicked() ), swDisplayForm, SLOT( close() ) );
swDisplayForm->show();
workspace->cascadeSubWindows();
// swDisplayForm->update();


Regards, B1.

wysota
1st September 2009, 07:28
Please provide a minimal compilable example reproducing the problem.

b1
2nd September 2009, 01:48
Wysota,

Attached is a zip file containing the cut down code. The problem occurs when I select "jobs/search for job details/search". It shouldn't need the databases but they are included just in case.

Thank you for the response, B1.

wysota
2nd September 2009, 08:22
I'm sorry but this is not a minimal compilable problem. It's neither minimal nor compilable. You have to provide something else. The archive should contain 3-4 files at most and the functionality should be stripped to the bare minimum required to reproduce the problem.