Skip to content

Commit

Permalink
Remove attempt to set flag that no longer exists in Qt 6
Browse files Browse the repository at this point in the history
The `AA_DisableWindowContextHelpButton` application attribute was used to disable the context
help button (`?` icon) from dialogs on Windows.

This attribute no longer exists in Qt 6, and as documented in the Qt 5 docs
(https://doc.qt.io/qtforpython-5/PySide2/QtCore/Qt.html#:~:text=Qt.AA_DisableWindowContextHelpButton)
it is no longer necessary in Qt 6 since the default behavior is now to hide the button.
  • Loading branch information
jonathanperret authored and dl1com committed Jul 25, 2024
1 parent b175f52 commit fb76f48
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/main/python/main/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import logging
from distutils.dir_util import copy_tree

from PySide6.QtCore import Qt, QCoreApplication, QTranslator, QLocale, QSettings
from PySide6.QtCore import QCoreApplication, QTranslator, QLocale, QSettings

from typing import TYPE_CHECKING, cast

Expand All @@ -29,15 +29,6 @@
class AppContext(ApplicationContext): # type: ignore # 1. Subclass ApplicationContext
REPO = "AllYarnsAreBeautiful/ayab-desktop"

def __init__(self) -> None:
self.configure_application()
super().__init__()

def configure_application(self) -> None:
# Remove Help Button
if hasattr(Qt, "AA_DisableWindowContextHelpButton"):
QCoreApplication.setAttribute(Qt.AA_DisableWindowContextHelpButton, True)

def run(self) -> int: # 2. Implement run()
self.make_user_directory()
self.configure_logger()
Expand Down

0 comments on commit fb76f48

Please sign in to comment.