查看完整版本: [-- QT中只有QLabel可以被HTML直接修饰么 --]

QTCN开发网 -> 《C++ GUI Qt 4编程》(第2版)专栏 -> QT中只有QLabel可以被HTML直接修饰么 [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

深海 2014-08-08 10:51

QT中只有QLabel可以被HTML直接修饰么

   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 2014-08-08 11:04
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


查看完整版本: [-- QT中只有QLabel可以被HTML直接修饰么 --] [-- top --]



Powered by phpwind v8.7 Code ©2003-2011 phpwind
Gzip disabled