Notification window in Mac. With or without Qt

后端 未结 5 1545
一整个雨季
一整个雨季 2021-02-06 13:03

Qt project on Mac OS X. I need to show notification window on top without stealing a focus from any active application.

Here the widget constructor part:



        
5条回答
  •  时光取名叫无心
    2021-02-06 14:00

    try this on mac:

    setWindowFlags(windowFlags() | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
    setAttribute(Qt::WA_TranslucentBackground);
    setAttribute(Qt::WA_AlwaysStackOnTop);
    

提交回复
热议问题