【问题标题】:QT5 Title bar obscures top row of buttons on Windows 10QT5 标题栏遮挡了 Windows 10 上的顶行按钮
【发布时间】:2018-03-31 22:09:24
【问题描述】:

我的 PyQT5 应用程序在 Linux、macOS 和一些 Windows PC 上运行良好,但在一些 Windows 10 PC 上,最上面的一排按钮被窗口框架/标题栏遮住了:

不仅按钮被遮挡,您还必须单击按钮下方才能单击它们,因此单击位置看起来是正确的,但按钮显示在单击位置上方。

按钮在 QT Creator UI 文件中创建如下:

<widget class="QMainWindow" name="MainWindow">
 <widget class="QWidget" name="centralwidget">
  <layout class="QGridLayout" name="gridLayout">
   <item row="0" column="0" colspan="10">
    <layout class="QHBoxLayout" name="horizontalLayout">
     <item>
      <widget class="QPushButton" name="OpenButton">

版本:来自 Miniconda 的 PyQt 5.6.0、qt5.6.2

【问题讨论】:

  • 这个错误在所有 Qt5.6+ 中都可以重现,不仅是 pyqt。
  • 如何添加按钮,是否使用布局?
  • @Arpegius 是在 5.7+ 中修复还是您说这是 QT 自 5.6 以来的实时错误?
  • 我使用 Qt5.10,但问题仍然出现在 windows 10 上,但我认为问题出在显示驱动程序中,因为它在某些 windows 更新后启动。

标签: qt pyqt qt5 pyqt5 qt5.6


【解决方案1】:

正如@Arpegius 所指出的,这是由于英特尔显卡驱动程序造成的(请参阅QT bug 62127

如果我将 QT 应用程序配置为使用我的 NVidia 适配器而不是我的 Intel 适配器,问题就会消失。

【讨论】:

    猜你喜欢
    • 2021-04-05
    • 1970-01-01
    • 2011-09-13
    • 1970-01-01
    • 2019-11-13
    • 2021-10-07
    • 2017-11-23
    • 2019-11-29
    • 2020-07-03
    相关资源
    最近更新 更多