Results 1 to 6 of 6

Thread: NEED HELP: QSystemTrayIcon QMenu doesn't dissapear

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: NEED HELP: QSystemTrayIcon QMenu doesn't dissapear

    A label is where a "goto" goes. In your example, retryTrayIcon is a label.
    They are bad because they make the code unreadable, are very likely to cause errors and also make the code harder to maintain.

    The only difference between your app and the Qt Systray example is that you start up with your application hidden. Try, just for testing, to show it, in main.cpp. See if you're experiencing the same behavior.

  2. The following user says thank you to marcel for this useful post:

    codeslicer (10th February 2008)

  3. #2
    Join Date
    Feb 2008
    Posts
    153
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    40
    Thanked 8 Times in 5 Posts

    Default Re: NEED HELP: QSystemTrayIcon QMenu doesn't dissapear

    Hmm, weird. In my original source code, adding or subtracting the win.show() didn't make a difference. But I made a seperate project removing extra commands and it worked. I'll look around, and if I can't find it, I'll upload a zipped copy of my source code. Thanks though

  4. #3
    Join Date
    Feb 2008
    Posts
    153
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    40
    Thanked 8 Times in 5 Posts

    Default Re: NEED HELP: QSystemTrayIcon QMenu doesn't dissapear

    I got it! It was QDevelop's fault. Apparently, when I ran the executable by using the debug button, the menu wouldn't lose focus. However, when I opened that binary, everything worked!!!

    This is truly strange Is it because QDevelop or the debugger is changing the ownership of the menu?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.