forked from qt-creator/qt-creator
QmlDesigner: Quick fix for Popup
This is a quickfix for Controls 2 Popup, Drawer, Menu and Dialog. We pretend everything derived from QtQuick.Controls.Popup is an item instead of a QQObject. Change-Id: I603dce8a1a1b08df3e2c1dccc0fa57e7ccef0800 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -1560,7 +1560,9 @@ bool NodeMetaInfo::isSubclassOf(const TypeName &type, int majorVersion, int mino
|
||||
|
||||
bool NodeMetaInfo::isGraphicalItem() const
|
||||
{
|
||||
return isSubclassOf("QtQuick.Item") || isSubclassOf("QtQuick.Window.Window");
|
||||
return isSubclassOf("QtQuick.Item")
|
||||
|| isSubclassOf("QtQuick.Window.Window")
|
||||
|| isSubclassOf("QtQuick.Controls.Popup");
|
||||
}
|
||||
|
||||
void NodeMetaInfo::clearCache()
|
||||
|
||||
@@ -54,6 +54,9 @@ bool QmlItemNode::isItemOrWindow(const ModelNode &modelNode)
|
||||
if (modelNode.metaInfo().isSubclassOf("QtQuick.Window.Window") && modelNode.isRootNode())
|
||||
return true;
|
||||
|
||||
if (modelNode.metaInfo().isSubclassOf("QtQuick.Controls.Popup"))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user