Skip to content

KCModuleQml: Also force height in addition to width

KCModuleQml's ApplicationItem sets its width to that of its containing Window. This allows e.g. a ScrollViewKCM to fill the entire view with a ListView which uses anchors.fill: parent.

In common circumstances, this works without also setting height. Notably, System Settings does not need it. However, a lack of height setter breaks down in these conditions:

  • When opening the KCM inside kcmshell6 instead of System Settings,
  • and also, the ScrollViewKCM (or such) is opened in a sub-page.

In this case, the ApplicationItem will remain at its default implicitHeight and anchors.fill: parent won't do its job. To fix this, force height in the same way as width is.

Screenshots

Before After
2025-09-29.062600 2025-09-29.062455

Anything else that already works, like the same page in System Settings, keeps working because apparently it overrides the height through some other means.

Merge request reports

Loading