开发者

What's the suitable widget in PyQt to create a floating widget on the desktop?

I'd like to create something very alike to Rainlendar with python. Currently I'm using PyQt for GUI, but there doesn't seem t开发者_JS百科o be a widget type that can directly display something like that, specifically I mean:

  1. No edge displayed, incuding buttons on the top right corner.
  2. No corresponding bar in the task bar.
  3. Able to display a icon in the icon area in the bottom right corner of the desktop.

Is there any widget capable of this ? Or can I do some modification to any existing widget to achieve this ?

Thanks.


  1. Have a look at the docs for QWidget.setWindowFlags. In particular, when coupled with Qt.FramelessWindowHint it should be borderless and buttonless.
  2. Another task for setWindowFlags — setting it to Qt.Tool stops the task bar entry. So combined with the above, you want window.setWindowFlags(Qt.Tool | Qt.FramelessWindowHint)
  3. See the docs for QSystemTrayIcon
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜