Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML One application, one taskbar entry, multiple windows
Forum Updated to NodeBB v4.3 + New Features

QML One application, one taskbar entry, multiple windows

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 464 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tm_sx
    wrote on last edited by
    #1

    I create a Qt6 QML application with multiple windows.
    I have the main screen (an ApplicationWindow) and from there I open (modal) another Window. The two windows are in different Qml files and the first one is set as a parent for the second one. Everything nice and fine.

    Now, the problem that I do have is that I have two entries in the Windows OS's taskbar. And I do not want that. I want only one entry for the application.

    The second window is an ApplicationWindow, with modality set to Qt.ApplicationModal and no flags set.

    I tried the flags: Qt.SubWindow (not working), Qt.Tool (does the taskbar thing but I do not have the standard window buttons: close, minimize, maximize), and those single or in combination with the other flags like WindowMinMaxButtonsHint & WindowCloseButtonHint.

    Does anyone know how to achieve this behavior?

    The MainScreen.qml looks like this:

    import QtQuick
    import QtQuick.Window
    import QtQuick.Controls
    import QtQuick.Layouts
    
    ApplicationWindow {
        id: mainScreen
        visible: true
        visibility: Window.Maximized
        ... 
    }
    

    The SecondScrren.qml looks like this:

    import QtQuick
    import QtQuick.Window
    import QtQuick.Controls
    import QtQuick.Layouts
    
    ApplicationWindow {
    ...
        modality: Qt.ApplicationModal
        visibility: Window.Maximized
    ...
    }
    

    Thanks!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved