QFramelessWindow.cpp 547 B

123456789101112131415161718192021222324252627
  1. #include "QFramelessWindow.h"
  2. #include "titlebar/TitleBarButton.h"
  3. #if defined(Q_OS_WIN32)
  4. /**
  5. * @brief 无边框窗口
  6. * @param parent
  7. */
  8. FramelessMainWindow::FramelessMainWindow(QWidget *parent) : WindowsFramelessWindow(parent) { }
  9. /**
  10. * @brief 无边框对话框
  11. * @param parent
  12. */
  13. FramelessDialog::FramelessDialog(QWidget *parent) : WindowsFramelessDialog(parent)
  14. {
  15. TitleBar *titleBar = getTitleBar();
  16. titleBar->minimizeButton()->hide();
  17. titleBar->setDoubleClickEnabled(true);
  18. }
  19. #elif defined(Q_OS_OSX)
  20. #else
  21. #endif