PDA

View Full Version : showMaximized in MDI



walito
12th September 2007, 14:53
Hi!!

Im preoblem using MDI and subwindow.
The problem is when use showMaximized(), setWindowFlags(Qt::WindowTitleHint) not found.

But I use show() setWindowFlags(Qt::WindowTitleHint) remove button OK.

Where is de problem?

The code is:


QMdiSubWindow *subWindow1 = new QMdiSubWindow(this);
subWindow1->setWindowTitle(tr("ZZZZ"));

subWindow1->setWindowFlags(Qt::WindowTitleHint);
subWindow1->setAttribute(Qt::WA_DeleteOnClose);
subWindow1->setWidget(new QPushButton("xxx"));

mdiArea->addSubWindow(subWindow1);
subWindow1->showMaximized();
//subWindow1->show();


Thz

wysota
13th September 2007, 08:49
Maximized windows don't have titles. Their title is shown on the viewport's title bar.

walito
13th September 2007, 22:58
Maximized windows don't have titles. Their title is shown on the viewport's title bar.


Sorry, the correct line is:



subWindow1->setWindowFlags(Qt::Window | Qt::CustomizeWindowHint);


But not found :(

wysota
14th September 2007, 00:48
This would make the mdi child a top level window, but that wouldn't make any sense, would it? What are you trying to achieve?