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. property "onClosing" is not present
Forum Updated to NodeBB v4.3 + New Features

property "onClosing" is not present

Scheduled Pinned Locked Moved Solved QML and Qt Quick
6 Posts 3 Posters 2.3k 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.
  • G Offline
    G Offline
    Gannu Bangalore
    wrote on last edited by
    #1

    I am using import QtQuick.Window 2.11 but i could not get onClosing property. It is Saying "Invalid Property name "onClosing""
    Pls help.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      There is no such property in Window component.

      There is a closing() signal, for which you can define an onClosing handler (slot):

      Window {
        onClosing: console.log("Window is being closed")
      }
      

      (Z(:^

      G 1 Reply Last reply
      3
      • dheerendraD Offline
        dheerendraD Offline
        dheerendra
        Qt Champions 2022
        wrote on last edited by
        #3
        When you use something like the following QtCreator complains saying that inValid Property. Don't worry about. Use it & it works.
        
        onClosing :{
            console.log("Closing it now")
        }
        

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        G 1 Reply Last reply
        1
        • sierdzioS sierdzio

          There is no such property in Window component.

          There is a closing() signal, for which you can define an onClosing handler (slot):

          Window {
            onClosing: console.log("Window is being closed")
          }
          
          G Offline
          G Offline
          Gannu Bangalore
          wrote on last edited by
          #4

          @sierdzio Thank you :)

          1 Reply Last reply
          0
          • dheerendraD dheerendra
            When you use something like the following QtCreator complains saying that inValid Property. Don't worry about. Use it & it works.
            
            onClosing :{
                console.log("Closing it now")
            }
            
            G Offline
            G Offline
            Gannu Bangalore
            wrote on last edited by
            #5

            @dheerendra Thank you :)

            1 Reply Last reply
            0
            • dheerendraD Offline
              dheerendraD Offline
              dheerendra
              Qt Champions 2022
              wrote on last edited by
              #6

              You can also move the issue to solved state.

              Dheerendra
              @Community Service
              Certified Qt Specialist
              http://www.pthinks.com

              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