Do not use QWidget::setWindowFlag(), it does not exist on older version of Qt5.

[GB.QT5]
* BUG: Do not use QWidget::setWindowFlag(), it does not exist on older version of Qt5.
This commit is contained in:
gambas 2022-02-16 08:12:41 +01:00
parent 72585bb3c6
commit 997a558714

View file

@ -2244,7 +2244,12 @@ void MyMainWindow::setBorder(bool b)
#ifdef QT5
bool visible = isVisible();
setWindowFlag(Qt::FramelessWindowHint, !_border);
if (_border)
setWindowFlags(windowFlags() & ~Qt::FramelessWindowHint);
else
setWindowFlags(windowFlags() | Qt::FramelessWindowHint);
if (visible) show();
#else
@ -2270,8 +2275,6 @@ void MyMainWindow::setResizable(bool b)
void MyMainWindow::setUtility(bool b)
{
Qt::WindowFlags flags;
if (_utility == b)
return;