您当前的位置: 首页 >  qt

DS小龙哥

暂无认证

  • 2浏览

    0关注

    679博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

QT软件开发: 窗口顶置(一直显示在最前面)

DS小龙哥 发布时间:2021-08-10 21:13:12 ,浏览量:2

设置QWidget窗口属性,保持窗口顶置在最前面显示。

CameraWidget::CameraWidget(QWidget *parent, int index) :
    QWidget(parent),
    ui(new Ui::CameraWidget)
{
    ui->setupUi(this);

    //隐藏标题栏
    setWindowFlags(Qt::FramelessWindowHint);//无边框 

    //设置窗口顶置: 一直在最前面.
    Qt::WindowFlags m_flags = windowFlags();
    setWindowFlags(m_flags | Qt::WindowStaysOnTopHint);
    setAttribute(Qt::WA_TranslucentBackground);

     ............................
}

关注
打赏
1664009229
查看更多评论
立即登录/注册

微信扫码登录

0.0363s