PDA

View Full Version : MDI - Child -- Restore Down



QT8seven
18th December 2011, 23:05
I am messing with MDI windows and, well, my child can be maximized and restored down, but the restore-down button is invisible. It does work, it is clickable, I just can't see it. Did I mess something up, is my QT install bad, or is this a bug?

Lykurg
19th December 2011, 08:02
How should we tell, if you don't show us your actual code. A minimal, compilable example, reproducing the problem would be best.

QT8seven
19th December 2011, 13:11
Well, I was hoping perhaps it was a common issue where someone would know the problem. Here is a very minimal example that reproduces the behavior:



#include <QtGui>


class MainWin : public QMainWindow
{
private:
public:
MainWin()
{
QWorkspace* mArea = new QWorkspace();
setCentralWidget(mArea);
QWidget* nWidget = new QWidget();
mArea->addWindow(nWidget);
}
~MainWin()
{

}
};

int main(int argC, char** argV)
{
QApplication myApp(argC,argV);
MainWin A;
A.show();
return myApp.exec();
}

The maximize button always appears, but the restore-down button while usable is invisible.

Lykurg
19th December 2011, 13:21
QWorkspace is deprecated. Use QMdiArea with QMidiArea::addSubWindow() instead. There you shouldn't face the problems.

QT8seven
19th December 2011, 13:38
Thank you, looks like I've got reading to do here.