https://bugs.kde.org/show_bug.cgi?id=496930

            Bug ID: 496930
           Summary: QMenu does not wrap contents at screen height
    Classification: Plasma
           Product: Breeze
           Version: 6.2.4
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: QStyle
          Assignee: plasma-b...@kde.org
          Reporter: so...@online.de
                CC: noaha...@gmail.com, uhh...@gmail.com
  Target Milestone: ---

Created attachment 176288
  --> https://bugs.kde.org/attachment.cgi?id=176288&action=edit
kde support information

The application qmapshack uses a QMenu to provide a list of items to change a
waypoint icon. This list contains 121 items.
During porting qmapshack to Qt6 a strange behavior has been encountered:
The Qt 5 version of qmapshack shows on my machine a single column containing
all entries and the single column can be scrolled.
The Qt6 version of qmapshack shows also a single column on my machine, but
scrolling does not work.
See image here:
https://github.com/Maproom/qmapshack/issues/648#issuecomment-2475741222

On other machines (e.g. using windows or Tuxedo OS(Ubuntu based)) the list of
waypoint icons are wrapped into multiple columns for the Qt5 and the Qt6
version of qmapshack, so scrolling isn't needed at all. See image here:
https://github.com/Maproom/qmapshack/issues/648#issuecomment-2475752824
If i use oxygen as application style the entries in the QMenu are wrapped and i
get also a multi-column list, while using breeze there is only a single column.

While examining this issue i found that executing QMenu->addAction() produces
different results for QMenu.sizeHint():
oxygen: if the screen.height (1080px in my case) is reached, the width of
sizeHint will be adjusted (a column get added)
breeze: all items change only the height of sizeHint (just one column)

In result the values of sizeHint are:
oxygen: sizeHint() = QSize(696, 1075)
breeze: sizeHint() = QSize(252, 3154), the resulting window will exceed the
screen height.

This happens also in a clean environment, eg by starting qmapshack as a new
created user.

The corresponding code of qmapshack can be found here:
https://github.com/Maproom/qmapshack/blob/23d6fe3e11bd251f123fdba1f1cf2ac8170d4f83/src/qmapshack/helpers/CWptIconManager.cpp#L297

STEPS TO REPRODUCE
1. Try to change a waypoint icon in qmapshack  (do not know which application
might also have such a QMenu)

OBSERVED RESULT
There is only a single column for all waypoint icons exceeding the screen
height.

EXPECTED RESULT
The items in the list of waypoint icons should wrap, so multiple columns are
shown and the resulting window should fit onto the screen.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: up to date archlinux
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0 
Qt Version: 6.8.0

ADDITIONAL INFORMATION
Scaling is not used.
kde support info can be found in the attachment

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to