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. Window and Controls - prevent multiple child windows
Forum Updated to NodeBB v4.3 + New Features

Window and Controls - prevent multiple child windows

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 904 Views 1 Watching
  • 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.
  • K Offline
    K Offline
    KyleWolfe
    wrote on last edited by
    #1

    So I've got the following in a MenuBar:

    @
    MenuItem {
    text: "Connect"
    onTriggered: {
    var component = Qt.createComponent("connect.qml");
    var connectWindow = component.createObject(this);
    }
    }
    @

    Is there a way within QML that I can check to see if connectWindow was already been created in order to prevent the same child window from opening?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jens
      wrote on last edited by
      #2

      You could for instance declare connectWindow as a regular property of the main window and only set the visible property to true if it has already been created when you trigger connect.

      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