zoukankan      html  css  js  c++  java
  • Qt 基础360UI学习

    1、setWindowFlags(Qt::FramelessWindowHint);  去掉操作系统提供的窗口边框

    2、setAttribute(Qt::WA_TranslucentBackground);

    Indicates that the widget should have a translucentbackground, i.e. ,any nonopaque regions of the widgets will be translucent because the widget will have an alpha     channel. Setting this flag causes WA_NoSystemBackground to be set. On Windows the widget also needs the Qt::FramelessWindowHint window flag to be set. This flag is     set or cleared by the widget's author.

    3、m_vecBtn[i]->setAutoExclusive(true);

    其中m_vecBtn 为Vector<QPushButton。
    If auto-exclusivity is enabled, checkable buttons that belong to the same parent widget behave as if they were part of the same exclusive buttongroup. In an exclusive  buttongroup, only one button canbe checked at anytime; checking another button automatically unchecks the previously checked one.

    3、label_checkUpdate->setOpenExternalLinks(true);

    4、背景半透明

    void MainWindow::paintEvent(QPaintEvent *)
    {
    //    QPainter painter(this);
    //    painter.drawPixmap(m_pixmapBg.rect(), m_pixmapBg);
        QPainter painter(this);
        QLinearGradient grad(0, 0, rect().width(), rect().height());
        {
                QGradientStops gs;
                gs << QGradientStop(0.0, QColor(0,0,0,100))
                        << QGradientStop(0.5, QColor(0,0,0,100))
                        << QGradientStop(1.0, QColor(0,0,0,100));
                grad.setStops(gs);
        }
        painter.fillRect(0, 0, rect().width(), rect().height(), grad);
    }
  • 相关阅读:
    Flask、Vue部署总结
    Recat教程(二)
    C第一个程序
    React教程(一)
    Flask+uwsgi+nginx 部署
    使用Dockerfile部署简单的应用
    Typescript搭建开发环境
    Typescript模块化/命名空间/装饰器
    Typescript的泛型/泛型接口
    修改git密码后,终端fatal: Authentication failed for'http://xxx/xxx.git'
  • 原文地址:https://www.cnblogs.com/wiessharling/p/3021726.html
Copyright © 2011-2022 走看看