Josdelsan / Proteus

Proteus is a configurable tool for editing structured documents, based on the concept of archetypes.
BSD 3-Clause "New" or "Revised" License
28 stars 3 forks source link

Crash when creating doc on MacOS Sonoma #13

Closed Alimuthanaa closed 1 month ago

Alimuthanaa commented 1 month ago

Trying to create a test doc and I the program crashes on my Mac. Any idea?

Screenshot 2024-09-24 at 16 38 38

proteus_crash_report-2024-09-24_16-28-35.log proteus_crash_report-2024-09-24_16-33-20.log proteus_crash_report-2024-09-24_16-39-57.log

Josdelsan commented 1 month ago

This issue is related to setTabsClosable method of the QTabWidget class. In both Linux and Windows, when tabs are marked as closable using the setTabsClosable a close button is added to each tab.

Looking at the logs we can confirm that either tab close button is placed in the left side or it is not being created at all.

Proteus/proteus/views/components/views_container.py", line 166, in create_component
    self.tabBar().tabButton(0, QTabBar.ButtonPosition.RightSide).hide()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'hide'

This will be fix in a hotfix soon. PyQt6 library usually provides methods to access special widgets features regardless the OS but this is not the case. We will do some extended testing apart from the already automated tests in order to find more issue of this nature.