Skip to content
Qt 6.11 is out! See what's new in the release blog
  • 144k Topics
    724k Posts
    1
    I’m building a macOS menu bar extra (a.k.a. system tray) app using PyQt6. When clicking the menu bar icon, a popup window appears, which is a QMainWindow with the Qt.WindowType.Popup window flag set. I’m noticing sporadic issues where the popup window doesn't respond to clicks even though it's open. Sometimes, clicking on a QPushButton inside the popup, or an action on the QMenu, causes it to close abruptly without the clicked signal being invoked on the button or the triggered action on a menu item (i.e., clicks are sometimes being “missed”). The popup window contains a QTreeWidget which I’ve styled with QSS so that hovering over a QTreeWidgetItem will cause it to be highlighted; sometimes the highlight doesn’t appear, suggesting that the open popup window is ignoring user interaction. Switching between windows from other open applications and then clicking the menu bar icon for my app sometimes causes the issue to occur. The issue is reproducible on macOS 15 Sequoia and macOS 26 Tahoe, using a mouse (on a Mac Mini) and a trackpad (on a MacBook Air). I'm using PyQt6 version 6.11.0, and Python 3.14.4. The app is distributed as a PyInstaller build, but I've noticed this issue sometimes occurring on my dev machine, where the app is executed directly from the Python interpreter. I tried calling the activateWindow() method on the QMainWindow object for the popup window, as well as calling grabMouse() (and releaseMouse() in the overridden method closeEvent()). I also ensured that the widgets within the popup window have its self object passed to their constructors. But the issue is still occurring. What should I be doing to ensure that the popup window is consistently capturing mouse input when it’s opened? What gotchas and caveats that I missed that could be causing this issue?
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k
    4k Topics
    23k Posts
    JKSHJ
    @jackfafa said in QMessageBox crash on close: After logging in, I lack the permissions to create bug reports Please try navigating to https://qt-project.atlassian.net/jira/your-work Do you get the required permissions now? (Reference: https://wiki.qt.io/Jira_Cloud_migration#First_time_users )
  • Everything related to designing and design tools

    131 396
    131 Topics
    396 Posts
    SGaistS
    Hi, I think the wiki has the starting point Hope it helps
  • Everything related to the Software Quality Tools

    95 261
    95 Topics
    261 Posts
    T
    Hi, just getting into Squish and I was wondering if anybody has any more advanced documentation or projects of MBT setups? I am trying to understand the limitations and possible application in my use case. I am unsure mostly of two things: Model generation through imports of existing graph files etc. automated path (test case) generation mostly if possible at all (found conflicting info) and if so how well it works. Any help, experience or pointers appreciated! thanks tim
  • Everything related to learning Qt.

    401 2k
    401 Topics
    2k Posts
    S
    [image: 286e3dad-f335-48d7-931b-362b4cb89ef4.png] Here is my business card solution image.
  • 2k Topics
    13k Posts
    SGaistS
    @Liang-Qi thanks ! I was rather thinking of a tldr but that's good :-)
  • 4k Topics
    18k Posts
    J
    どのプラットフォームでアプリを作っていますか。 もしWindowsなら、簡単にできりますが、macOSやらUbuntu/ Gnomeやら上ではあまり簡単ではありません。 凡そ、実行ファイルのアイコンなら、Qt自身は関係があまりありません。実は、Windowsなら、*.rcファイルの仕上げの後、Cmakeに「qt_add_executable(App ... app.rc」と書いて、本物のapp.rcの中で、「IDI_ICON1 ICON DISCARDABLE "app_icon.ico"」と書いたらできそうです。macOSの方も似ているが、「.icns」と「Info.plist」の整備はWindowsよりめっちゃ面倒のそうであってしまうといいます。 もちろん、cmakeファイルの中にはプラットフォームを分類するために以下のcodeを加えなければなりません: if (${CMAKE_SYSTEM_NAME STREQUAL "Windows") set(Windows_Resources "...") elseif (... "Darwin") # macOSになる set(MacOS_Bundle "...") ...
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k
    1k Topics
    10k Posts
    SGaistS
    Ok, akismet triggering is not always clear. Beside this issue, what was your question about ?