diff --git a/examples/network/fortuneclient/client.cpp b/examples/network/fortuneclient/client.cpp index b4c3d9328d6..42fed304453 100644 --- a/examples/network/fortuneclient/client.cpp +++ b/examples/network/fortuneclient/client.cpp @@ -117,7 +117,7 @@ Client::Client(QWidget *parent) //! [4] QGridLayout *mainLayout = Q_NULLPTR; - if (QGuiApplication::styleHints()->showIsFullScreen()) { + if (QGuiApplication::styleHints()->showIsFullScreen() || QGuiApplication::styleHints()->showIsMaximized()) { QVBoxLayout *outerVerticalLayout = new QVBoxLayout(this); outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding)); QHBoxLayout *outerHorizontalLayout = new QHBoxLayout; diff --git a/examples/network/fortuneserver/server.cpp b/examples/network/fortuneserver/server.cpp index 28f02308944..089f594cabb 100644 --- a/examples/network/fortuneserver/server.cpp +++ b/examples/network/fortuneserver/server.cpp @@ -100,7 +100,7 @@ Server::Server(QWidget *parent) buttonLayout->addStretch(1); QVBoxLayout *mainLayout = Q_NULLPTR; - if (QGuiApplication::styleHints()->showIsFullScreen()) { + if (QGuiApplication::styleHints()->showIsFullScreen() || QGuiApplication::styleHints()->showIsMaximized()) { QVBoxLayout *outerVerticalLayout = new QVBoxLayout(this); outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding)); QHBoxLayout *outerHorizontalLayout = new QHBoxLayout;