그래픽 부분없이 실제 컨트롤 단지 논리적 골격이다은 대조군 팝업 템플릿에서 팝업 단지 장식 버전 템플릿 :
//Popup.qml
import QtQuick 2.6
import QtQuick.Templates 2.0 as T
T.Popup {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
contentWidth > 0 ? contentHeight + topPadding + bottomPadding : 0)
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
padding: 12
contentItem: Item { }
background: Rectangle {
border.color: "#353637"
}
}
그래서 아무런 행동상의 차이가 없어야합니다.