PDA

View Full Version : QWizard with graphic error



MadMax411
17th December 2013, 12:22
Hello!

I used the QWizard and I get the following graphic error:

9862

I use a QMainWindow and a QMdiArea in my application. The QWizard is a QSubWindow of the QMdiArea.
(The white rectangle is to protect application data)

Has anyone an idea how to find the reason for that issue?

Greetings,
Markus

anda_skoa
17th December 2013, 13:41
So you embed the QWizard into a QMdiSubWindow?
Using reparent() on the wizard?

Alternatively, since you don't want a dialog, maybe use QStackedWidget instead?

Cheers,
_

MadMax411
17th December 2013, 14:55
Not really, I emded the QWizard as a Widget, so the QMdiArea will create the QMdiSubwindow.

CMyWizard *wiz = new CMyWizard();
wiz->setAttribute(Qt::WA_DeleteOnClose);

QMdiSubWindow *sub = m_MDI->addSubWindow( wiz );
sub->setGeometry( 100,50, 720,600 );

wiz->setParent( sub );

dlg->show();


[Edit]
I added "wiz->setParent( sub );", but that makes no different.

Added after 35 minutes:

I think the problem is that you can't use a QWizard as a SubWindow in a QMdiArea. As a QDialog in the QMainWindow the style of the Wizard changes and the graphics are correct. So I'm going to change the workflow of the application.