[Solved] How can Icapture QDialog´s load/show event?
-
Can you provide me with a code snippet to do this. in my .cpp file constructor, I tried the follwing but it did not like the line ¨ if (obj == ui->frm_Connection)¨
@
// in constructor
installEventFilter(this);bool frm_Connection::eventFilter(QObject *obj, QEvent *event)
{
if (obj == ui->frm_Connection)
{
if(event == QEvent::Show)
{
}
}
}
@thanks!
-
@if (obj == ui->frm_Connection)@
i think it can be
@if(obj == this)@ -
I found it!!! You just need to override QDialog´s showEvent sub routine.
-
That is indeed the solution you need to go for.