Qt5: hideEvent not fired after showMinimized
-
Hello.
I have application, which displays my QWidget derived widget (no QMainWindow used):
@class RthTools : public QWidget
{
Q_OBJECTpublic:
explicit RthTools(QWidget *parent = 0);
~RthTools();protected:
void showEvent(QShowEvent *);
void hideEvent(QHideEvent *);...
}@
@
...void RthTools::pickColor()
{
//qDebug() << "> RthColorDialog::pickColor()";this->takingScreenshot = true; this->showMinimized();
}
void RthTools::showEvent(QShowEvent *e)
{
//qDebug() << "> RthColorDialog::showEvent";
}void RthTools::hideEvent(QHideEvent *e)
{
//qDebug() << "> RthColorDialog::hideEvent";
QWidget::hideEvent(e);
if (this->takingScreenshot)
QTimer::singleShot(50, this, SLOT(takeScreenshot()));
}...
@After click on button, pickColor() slot is called and widget is minimized, but the hideEvent is not fired.
Note: this approach worked fine on previous version 4.7.x, 4.8.x.
Could someone please help me? Thanks in advance.
-
Hi,
You should add which version of Qt you are using as well as OS
-
Then you should re-check if it's still the same with 5.4