import QtQuick 2.0 import Label 2.0 Item{ property string rolltext: contentTextId.text // property alias rollTextId:contentTextId // property alias rollAnimationId:animText property int rollfont:animfont property alias anmitextposition:contentTextId.horizontalAlignment property bool flag:false property int font_not_change:2 // property bool rollswitch:animswitch id:rectText clip:true HMILabel { id:contentTextId width: rectText.width+5//contentTextId.contentWidth height: rectText.height color: "white" font.pixelSize: rollfont text:rolltext wtitesize:font_not_change horizontalAlignment: Label.AlignLeft verticalAlignment: Label.AlignBottom//liang hang gun dong 2017/3/28 cxx // elide:Text.ElideRight onTextChanged: { contentTextId.visible = false flag = false //animText.from = 0 animText.loops = 0 animText.running = false run_ctrl.running = true } Timer{ id:run_ctrl interval: 30 running: false onTriggered: { if(rectText.widthrectText.width)?true:false onRunningChanged: { if(running == false) { contentTextId.x=0 contentTextId.width=rectText.width if(rectText.width