Skip to content

hongnod/QtFramelessWindow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QtFramelessWindow

Custom frameless window,dialog,messagebox Library / 自定义无边框窗体,对话框和提示框,并封装成库

image

使用方法:

#include "framelesswindow.h"
#include <QWidget>
#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    // FramelessWindow
    FramelessWindow *pWindow = new FramelessWindow();
    QWidget *pCentralWidget = new QWidget(pWindow);
    pWindow->setCentralWidget(pCentralWidget);
    pWindow->show();
    
    // FramelessDialog
    FramelessDialog *pDialog = new FramelessDialog(pWindow);
    QWidget *pDlgCentralWidget = new QWidget(pDialog);
    QPushButton *pButton = new QPushButton(pDlgCentralWidget);
    pDialog->setCentralWidget(pDlgCentralWidget);
    pDialog->setModal(true);
    pDialog->show();
    
    // FramelessMessageBox
    FramelessMessageBox::showInformation(pWindow, QObject::tr("提示!"), QObject::tr("自定义提示框!"));
    return a.exec();
}

About

Qt FramelessWindow class implementation with frameless window and custom style Dialog and MessageBox titlebar Border shadow

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.7%
  • QMake 1.7%
  • C 0.6%