Bug 468582 - Assigning Templates.StackView to a property with Kirigami.PageRow type
Summary: Assigning Templates.StackView to a property with Kirigami.PageRow type
Status: REPORTED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.100.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-16 17:25 UTC by Matej Starc
Modified: 2023-04-16 17:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matej Starc 2023-04-16 17:25:20 UTC
SUMMARY
When you run examples/simpleexamples/AbstractApplicationWindow.qml it logs warning that we are assigning a object of non PageRow type to a PageRow typed property. It turns out we are assigning a StackView.view to that property. Also, we are doing the same for ColumnView.

See:
https://invent.kde.org/frameworks/kirigami/-/blob/master/examples/simpleexamples/AbstractApplicationWindow.qml
https://invent.kde.org/frameworks/kirigami/-/blob/master/src/controls/Page.qml#L242
https://invent.kde.org/frameworks/kirigami/-/blob/master/src/controls/Page.qml#L246

STEPS TO REPRODUCE
1. Navigate to examples/simpleexamples
2. Execute ``qmlscene AbstractApplicationWindow.qml``
3. Check the console log

EXPECTED RESULT
We shouldn't have errors in the log for things like these. It makes kirigami look ridiculous. On the other hand, the only way to "fix" this is to make that property a QObject. 

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Kernel Version: 6.1.24-1-lts (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i7-8700 CPU @ 3.20GHz
Memory: 15,6 GiB of RAM
Graphics Processor: AMD Radeon RX 480 Graphics


LOG:
file:///usr/lib/qt/qml/org/kde/kirigami.2/Page.qml:359: Error: Cannot assign QObject* to PageRow_QMLTYPE_26*
file:///usr/lib/qt/qml/org/kde/kirigami.2/Page.qml:359: Error: Cannot assign QObject* to PageRow_QMLTYPE_26*