Titlebar disappears in fullScreen mode in a QGuiApplication window
-
Hello everyone,
On Windows, when I try to do full screen mode in a QGuiApplication window, the title bar disappears
Here is my code :int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine; const QUrl url(u"qrc:/Fullscreen/Main.qml"_qs); QObject::connect(&engine, &QQmlApplicationEngine::objectCreationFailed, &app, []() { QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.load(url); QObject* rootObject = engine.rootObjects().value(0); QQuickWindow* window = qobject_cast<QQuickWindow*>(rootObject); if (window) { // Put the window in fullscreen mode window->showFullScreen(); } return app.exec(); }Is there any way to maintain the titlebar visible (including close, minimize buttons) in full screen mode ?
-
Hello everyone,
On Windows, when I try to do full screen mode in a QGuiApplication window, the title bar disappears
Here is my code :int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine; const QUrl url(u"qrc:/Fullscreen/Main.qml"_qs); QObject::connect(&engine, &QQmlApplicationEngine::objectCreationFailed, &app, []() { QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.load(url); QObject* rootObject = engine.rootObjects().value(0); QQuickWindow* window = qobject_cast<QQuickWindow*>(rootObject); if (window) { // Put the window in fullscreen mode window->showFullScreen(); } return app.exec(); }Is there any way to maintain the titlebar visible (including close, minimize buttons) in full screen mode ?
@Yazid10 said in Titlebar disappears in fullScreen mode in a QGuiApplication window:
Is there any way to maintain the titlebar visible
Don't use fullscreen-mode if you need titlebar/window decorations.
That is what fullscreen is: no title bar and window decorations... -
@Yazid10 said in Titlebar disappears in fullScreen mode in a QGuiApplication window:
Is there any way to maintain the titlebar visible
Don't use fullscreen-mode if you need titlebar/window decorations.
That is what fullscreen is: no title bar and window decorations... -
@jsulm Okey, thanks.. so in this case how can I make the window fill the whole screen with the titlebar still being visible ?
-
@jsulm Correct me if I'm wrong but can we use QWidget in a QGuiApplication ? Because as far as I know, in a Qt Quick application the primary window is typically a QQuickWindow object
-
Y Yazid10 has marked this topic as solved on