Bug 468582

Summary: Assigning Templates.StackView to a property with Kirigami.PageRow type
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Matej Starc <matej.starc>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: REPORTED ---    
Severity: normal CC: notmart
Priority: NOR    
Version First Reported In: 5.100.0   
Target Milestone: Not decided   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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*