• 3922阅读
  • 1回复

[提问]QT中只有QLabel可以被HTML直接修饰么 [复制链接]

上一主题 下一主题
离线深海
 

只看楼主 倒序阅读 楼主  发表于: 2014-08-08
   QLabel *label=new QLabel("<h2><i>A</i>"
                             "<font color=red>B</font></h2>");这样是可以的,并且显示效果改变了
而QPushButton *button=new QPushButton("<h2><i>quit</i></h2>");这样修饰文本为什么及u不起作用了呢
离线toby520

只看该作者 1楼 发表于: 2014-08-08
Push buttons display a textual label, and optionally a small icon. These can be set using the constructors and changed later using setText() and setIcon(). If the button is disabled, the appearance of the text and icon will be manipulated with respect to the GUI style to make the button look "disabled".好像只能显示文本的QLabel
QtQML多多指教开发社区 http://qtclub.heilqt.com
将QtCoding进行到底
关注移动互联网,关注金融
开发跨平台客户端,服务于金融行业
专业定制界面
群号:312125701   373955953(qml控件定做)
快速回复
限100 字节
 
上一个 下一个