1、设置行间距

QLabel没有设置行间距的函数,所以这种办法是行不通的。只能采用其它类似的方法来实现,例如设置行高,使用样式代码如下:

<p style='line-height:18px'>推荐</p>

 

2、链接文本

实现点击Label,即可打开网页,且文本没有下划线效果,如下:

<a href="http://www.sina.com"><span style="text-decoration: none; color:#ff0000">新浪</style></a>

text-decoration: none,表示没有文本修饰,下划线就没有了。

 

http://blog.csdn.net/itjobtxq/article/details/9288787

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2021-11-13
  • 2021-07-03
  • 2021-06-10
  • 2021-06-11
相关资源
相似解决方案