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. Taskbar Menu

Taskbar Menu

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 458 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.
  • N Offline
    N Offline
    Nan Feng
    wrote on last edited by
    #1

    Hi.
    How to hide the right-click menu of the Qt program in the taskbar (it is a system menu, the content is: close the window, fixed to the taskbar...)?

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Nan-Feng said in Taskbar Menu:

      close the window, fixed to the taskbar

      I doubt you can do that with Qt as it is something done by the OS. Maybe there is something in Win32 API.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • N Offline
        N Offline
        Nan Feng
        wrote on last edited by
        #3

        Since I have used Qt, I no longer want to call the system API. If I can’t achieve what I just said, can I intercept the close event in the right-click menu on the taskbar? I know that the close event must be intercepted in eventFilter or closeEvent. But how should it be judged that it is the closing event of the taskbar menu? Because there is a close event triggered from a button on the form, we need to judge.

        Pl45m4P 1 Reply Last reply
        0
        • N Nan Feng

          Since I have used Qt, I no longer want to call the system API. If I can’t achieve what I just said, can I intercept the close event in the right-click menu on the taskbar? I know that the close event must be intercepted in eventFilter or closeEvent. But how should it be judged that it is the closing event of the taskbar menu? Because there is a close event triggered from a button on the form, we need to judge.

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by Pl45m4
          #4

          @Nan-Feng said in Taskbar Menu:

          can I intercept the close event in the right-click menu on the taskbar?

          You can use the closeEvent, but then it will activate every time you try to close the window, no matter how.

          But how should it be judged that it is the closing event of the taskbar menu?

          AFAIK, Qt can't differenciate that.

          Because there is a close event triggered from a button on the form, we need to judge.

          Create two cases:

          • First case: You click your button... It's very easy to tell, if you close your window with your own button
          • Second case: Every other close event: Your button was not clicked

          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          1

          • Login

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