Found this in the Indicators. Not sure if it's a problem with autopilot or qt.
If the subclass does not have it's own local properties the class name end's up at the first ancestor which does.
self.app.select_single("SwitchMenu", _switchMenu") returns None
self.app.select_single("*", _switchMenu") returns a BasicMenu_QMLTYPE_XXX
If you add a local property to SwitchMenu (eg property alias checked : switch.checked)
self.app.select_single("SwitchMenu", _switchMenu") returns a SwitchMenu_QMLTYPE_XXX
Could be something to do with the metaType className ?
Found this in the Indicators. Not sure if it's a problem with autopilot or qt.
If the subclass does not have it's own local properties the class name end's up at the first ancestor which does.
eg: (from indicators-client)
"BasicMenu.qml" ntItem : false
ListItem.Standard {
property bool listViewIsCurre
property QtObject menu
. . .
}
"Menu.qml"
BasicMenu {
. . .
color: "#221e1c"
HLine { ... }
HLine { ... }
. . .
}
"SwitchMenu.qml"
Menu {
id: _switchMenu
. . .
control: Switch { ... }
DBusActionState { ... }
. . .
}
self.app. select_ single( "SwitchMenu" , _switchMenu") returns None select_ single( "*", _switchMenu") returns a BasicMenu_ QMLTYPE_ XXX
self.app.
If you add a local property to SwitchMenu (eg property alias checked : switch.checked) select_ single( "SwitchMenu" , _switchMenu") returns a SwitchMenu_ QMLTYPE_ XXX
self.app.
Could be something to do with the metaType className ?