We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
无法将text中的内容显示到ui界面 import QtQuick 2.15 import QtQuick.Controls 2.5 import QtQuick.Layouts 1.3 import QtQml 2.12
//中间显示部分 Frame{
property var qmlList: [ {icon:"recommend-white",value:"推荐内容",qml:"DetailRecommendPageView"}, {icon:"recommend-white",value:"推荐内容",qml:"DetailRecommendPageView"}, {icon:"recommend-white",value:"推荐内容",qml:"DetailRecommendPageView"}, {icon:"recommend-white",value:"推荐内容",qml:"DetailRecommendPageView"}, {icon:"recommend-white",value:"推荐内容",qml:"DetailRecommendPageView"}, {icon:"recommend-white",value:"推荐内容",qml:"DetailRecommendPageView"}] Layout.preferredWidth: 200 Layout.fillHeight: true background: Rectangle{ color: "#1000AAAA" } padding: 0//内边距 ListView{ id: menuView height: parent.height Layout.fillHeight: true Layout.fillWidth: true model: ListModel{ id: menuViewModel } delegate: menuViewDelegate } Component{ id: menuViewDelegate Rectangle{ id: menuViewDelegateItem height: 50 width: 200 color: "#00AAAA" RowLayout{ anchors.fill: parent anchors.centerIn: parent spacing: 15 Item { width: 30 } Image{ //source: "qrc:/images/"+icon source: "qrc:/images/"+icon Layout.preferredHeight: 20 Layout.preferredWidth: 20 } Text{ text: value Layout.fillWidth: true height: 50 //font.family: window.mFONT_FAMILY font.pointSize: 12 //color: "#ffffff" color: "#ff0000" // 设置颜色为红色 } } } } Component.onCompleted: { menuViewModel.append(qmlList) }
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
无法将text中的内容显示到ui界面
import QtQuick 2.15
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.3
import QtQml 2.12
//中间显示部分
Frame{
}
The text was updated successfully, but these errors were encountered: