首页| 论坛| 消息

标题:关于qml做跑马灯效果请教各路英雄
作者:tiaotiaoking
日期:2011-08-30 18:51
内容:

import QtQuick 1.0import QtWebKit 1.0Rectangle{id: recwidth: 400; height: 400color: "lightblue"WebView{id: viewanchors.centerIn: parenthtml: " hello world! "}}请问如何设置“hello world” 里面的字体颜色,如何将“hello world”里面的背景颜色继承parent的颜色(而不是现在背景的白色)
或者请教各位qml做跑马灯有什么别的方法吗,比如和javascript连接做跑马灯效果也可以


#1 回 楼主(tiaotiaoking) 的帖子 [wxj120bw 08-30 21:43]
第一个问题 你可以直接id调用颜色赋给子类 第二个暂时考虑下
#2 [tiaotiaoking 08-31 10:12]
似乎不行
你可以写给我看看吗
#3 回 2楼(tiaotiaoking) 的帖子 [wxj120bw 09-03 14:39]
问题解决了没有 直接贴第一个问题代码
import QtQuick 1.0
Rectangle {
width: 360
height: 360
color: '#233456';
Text {
text: "Hello World"
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
}
}
}
#4 [tiaotiaoking 09-03 15:52]
我这个问题的前提是要在实现跑马灯的条件下
你这么写不能实现跑马灯啊
#5 [donby 11-01 11:38]
大大您好
我跟您遇到一样的问题
所幸在网上找到有好心人分享实做跑马灯的效果
网址如下
http://www.developer.nokia.com/Community/Wiki/Creating_a_QML_Marquee_Component
参考看看啰

回复 发表
主题 版块