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);
    }
  • 相关阅读:
    Number Two
    蝴蝶结
    webug3.0靶场渗透基础Day_1
    SQL SERVER2014的安装
    SQLILABS学习笔记(一)
    关于暴力破解的一些学习笔记(pikachu)
    sql注入学习笔记
    CSRF与平行越权的区别
    任意文件下载(pikachu)
    XSS跨站脚本攻击学习笔记(pikachu)
  • 原文地址:https://www.cnblogs.com/wiessharling/p/3021726.html
Copyright © 2011-2022 走看看