麻烦问问大家在QTextbrowser 里面写的html如何实现点击功能?

superwavelet 2011-05-25 02:40:56
我想在QTextbrowser 里面显示一些html的文字,然后实现点击一个文字,调用对应的slot函数执行相应功能。

但是我找了半天还是没找到如何实现对html文字的点击,鼠标都没有变成小手,不能点击。如何办?

非常感谢
...全文
277 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
superwavelet 2011-05-31
  • 打赏
  • 举报
回复
非常感谢,我已经弄好了
zhh_kv 2011-05-25
  • 打赏
  • 举报
回复
openExternalLinks : bool
Specifies whether QTextBrowser should automatically open links to external sources using QDesktopServices::openUrl() instead of emitting the anchorClicked signal. Links are considered external if their scheme is neither file or qrc.

The default value is false.

This property was introduced in Qt 4.2.

Access functions:

bool openExternalLinks () const
void setOpenExternalLinks ( bool open )
openLinks : bool
This property specifies whether QTextBrowser should automatically open links the user tries to activate by mouse or keyboard.

Regardless of the value of this property the anchorClicked signal is always emitted.

The default value is true.

This property was introduced in Qt 4.3.

Access functions:

bool openLinks () const
void setOpenLinks ( bool open )

16,199

社区成员

发帖
与我相关
我的任务
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
  • Qt
  • 亭台六七座
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧