avoid Qt5/6 incompatibilities
This commit is contained in:
parent
963ccb1da8
commit
5757d49ba9
@ -70,23 +70,14 @@ namespace
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void geometryChanged( const QRectF& newGeometry,
|
protected:
|
||||||
const QRectF& oldGeometry ) override
|
|
||||||
{
|
|
||||||
Inherited::geometryChanged( newGeometry, oldGeometry );
|
|
||||||
|
|
||||||
if ( auto popup = static_cast< QskPopup* >( parentItem() ) )
|
|
||||||
{
|
|
||||||
if ( popup->hasOverlay() )
|
|
||||||
popup->update();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool event( QEvent* event ) override
|
bool event( QEvent* event ) override
|
||||||
{
|
{
|
||||||
bool ok = Inherited::event( event );
|
bool ok = Inherited::event( event );
|
||||||
|
|
||||||
if ( event->type() == QEvent::MouseButtonPress )
|
const int eventType = event->type();
|
||||||
|
|
||||||
|
if ( eventType == QEvent::MouseButtonPress )
|
||||||
{
|
{
|
||||||
if ( auto popup = static_cast< QskPopup* >( parentItem() ) )
|
if ( auto popup = static_cast< QskPopup* >( parentItem() ) )
|
||||||
{
|
{
|
||||||
@ -97,6 +88,14 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ( eventType == QskEvent::GeometryChange )
|
||||||
|
{
|
||||||
|
if ( auto popup = static_cast< QskPopup* >( parentItem() ) )
|
||||||
|
{
|
||||||
|
if ( popup->hasOverlay() )
|
||||||
|
popup->update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user