【问题标题】:Creating Window That Has No Close Button in Qt在 Qt 中创建没有关闭按钮的窗口
【发布时间】:2016-03-13 15:00:24
【问题描述】:

是否可以创建如下图所示的窗口,在 qt 设计器中没有关闭按钮?

【问题讨论】:

标签: qt pyqt qt-designer


【解决方案1】:

要获得这样的外观,您需要使用 setWindowsFlags 函数,并传入 Qt::CustomizeWindowHint Qt::FramelessWindowHint,在 C++ 中这看起来像 someUi->setWindowsFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint) 但我不确定 PyQt。

【讨论】:

  • self.setWindowFlags(QtCore.Qt.FramelessWindowHint) in qt
猜你喜欢
  • 2013-06-11
  • 2011-04-14
  • 1970-01-01
  • 1970-01-01
  • 2017-07-02
  • 2021-03-09
  • 2015-10-12
  • 1970-01-01
相关资源
最近更新 更多