-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
4.3.0
-
None
When calling showMinimized on a docked QDockWidget, nothing happens.
Except when trying to undock the dockwidget, then it suddenly tries to minimize itself. If the dock is
redocked before it is minimized it will redock and show up as a docked dockwidget. If the dockwidget is undocked it will minimize as soon as releasing the mouse button.
Maybe the correct behaviour would be to ignore showMinimized if it is called when it is docked.
Reproducible with:
#include <QtGui>
#include <QDebug>
class CustomWidget : public QPushButton
{ Q_OBJECT
public:
CustomWidget(QWidget* parent=0) : QPushButton(parent)
public: QDockWidget *dock;
public slots:
void aSlot()
{
qDebug() << "aSlot invoked";
static int a=0;
if (a == 0)
else
{ dock->showNormal(); a=0; }}
protected:
void paintEvent(QPaintEvent *pe)
};
#include "main.moc"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
CustomWidget c;
c.show();
QMainWindow w;
w.show();
QDockWidget widget(&w);
c.dock = &widget;
widget.show();
widget.setFloating(true);
return app.exec();
}