Keep Qt tooltip open

廉价感情. 提交于 2019-12-11 12:05:42

问题


Windows tooltips do close after a certain amount of time (5-32 sec afaik). In Qt they seem to be set to 10 sec autoclose. Is there any way I can alter this behaviour? Qt docs remain silent about that.

Maybe there are any custom tooltip classes around which I can make sticky? Qt Creator uses some sort of custom ToolTips for debugging.

Thanks!


回答1:


I googled "qt tooltip delay" and the second link sent me to the Nokia FAQ, where it explains that the tooltip timer is hardcoded, and gives a "workaround" for that here: http://developer.qt.nokia.com/faq/answer/how_can_i_change_the_timeout_period_for_a_qtooltip

Yet the first comment on that says that it only works if you want to make the tooltip delay shorter, not longer. The first link in my search suggest modifying the class yourself, but that's probably not a good idea, albeit it might be a temporary solution, since it seems the suggestion for this feature was sent ages ago (since before Nokia bought them), and it hasn't been implemented yet.



来源:https://stackoverflow.com/questions/9173821/keep-qt-tooltip-open

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!