compatibility method for early Qt versions

This commit is contained in:
Uwe Rathmann 2022-02-08 09:01:18 +01:00
parent 05dd8ea087
commit 9cc840f0f8
2 changed files with 16 additions and 0 deletions

View File

@ -220,6 +220,18 @@ QskWindow::~QskWindow()
#endif
}
#if QT_VERSION < QT_VERSION_CHECK( 5, 9, 0 )
void QskWindow::setFlag(Qt::WindowType flag, bool on)
{
if( on )
setFlags( flags() | flag );
else
setFlags( flags() & ~flag );
}
#endif
void QskWindow::setScreen( const QString& name )
{
if ( !name.isEmpty() )

View File

@ -43,6 +43,10 @@ class QSK_EXPORT QskWindow : public QQuickWindow
using Inherited::setScreen;
void setScreen( const QString& );
#if QT_VERSION < QT_VERSION_CHECK( 5, 9, 0 )
void setFlag( Qt::WindowType, bool on = true );
#endif
bool deleteOnClose() const;
void setDeleteOnClose( bool );