Hi friends,
I'm developing an application in MDI. I have a window in the designer developed with properties in height and width fixed, but to put in a QMdiSubWindow, these properties are lost and the window can be resized. Indeed there should not appear maximize the button and much less allow resizing. How to fix this?
Here this partial code:
template<class T> T *MainWindow::createT(T *win)
{
win = new T();
QMdiSubWindow *mdiSubWin = new QMdiSubWindow;
mdiSubWin->setWidget(win);
mdiSubWin->setAttribute(Qt::WA_DeleteOnClose);
mdiArea->addSubWindow(mdiSubWin);
mdiSubWin->show();
// mdiSubWin->setSizePolicy(qobject_cast<T *>(win)->sizePolicy());
}
template<class T> T *MainWindow::createT(T *win)
{
win = new T();
QMdiSubWindow *mdiSubWin = new QMdiSubWindow;
mdiSubWin->setWidget(win);
mdiSubWin->setAttribute(Qt::WA_DeleteOnClose);
mdiArea->addSubWindow(mdiSubWin);
mdiSubWin->show();
// mdiSubWin->setSizePolicy(qobject_cast<T *>(win)->sizePolicy());
}
To copy to clipboard, switch view to plain text mode
Thanks help,
Marcelo Estanislau
Standard Net Tecnologia
Brazil - RS
Bookmarks