Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to detect the ubuntu shut down button pressed or not?
Forum Updated to NodeBB v4.3 + New Features

How to detect the ubuntu shut down button pressed or not?

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 1.8k Views 2 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.
  • V Offline
    V Offline
    vIJI
    wrote on last edited by
    #1

    Hi,
    I want to pop up/Run my GUI application whenever shut down button is pressed in ubuntu 14.04.
    Any help how do i do this..

    Thank you.

    RatzzR 1 Reply Last reply
    0
    • V vIJI

      Hi,
      I want to pop up/Run my GUI application whenever shut down button is pressed in ubuntu 14.04.
      Any help how do i do this..

      Thank you.

      RatzzR Offline
      RatzzR Offline
      Ratzz
      wrote on last edited by
      #2

      @vIJI
      May be aboutToQuit() helps you .

      --Alles ist gut.

      1 Reply Last reply
      1
      • kshegunovK Offline
        kshegunovK Offline
        kshegunov
        Moderators
        wrote on last edited by
        #3

        Hello,
        If you want to actually connect to the hardware event, that may not be easy at all, otherwise this might be useful.

        Read and abide by the Qt Code of Conduct

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Do you mean you would like to do something when it's shutting down i.e. save the state of your application ? Or react on the button itself ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • V Offline
            V Offline
            vIJI
            wrote on last edited by
            #5

            Thank you guys for your answers but, can you explain me in steps , i am new to Qt so, @SGaist yup, exactly i want to see popping up of my Qt application on shut down button pressed.

            Apologies,
            Thank you.

            1 Reply Last reply
            0
            • V Offline
              V Offline
              vIJI
              wrote on last edited by
              #6

              @Ratzz nope its not working.

              Thank you.

              1 Reply Last reply
              0
              • V Offline
                V Offline
                vIJI
                wrote on last edited by
                #7

                @SGaist
                i want my application to popup whenever shutdown button is pressed

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  What do you need it to do ? Save the state of your application ? Block the shutdown ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  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