<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Since PyQt 5.11, the MacOS version of PyQt5 appears to have had a number of issues, mostly to do with failing to repaint text boxes (e.g., see <a href="https://bugreports.qt.io/browse/QTBUG-68521" class="">https://bugreports.qt.io/browse/QTBUG-68521</a> and <a href="https://bugreports.qt.io/browse/QTBUG-68740" class="">https://bugreports.qt.io/browse/QTBUG-68740</a>). There were reports that this had been fixed by 5.12, but that has not been my experience. I haven’t had time to check on 5.14 yet. Everything seems to be fine on Linux, at least with 5.12. <div class=""><br class=""></div><div class="">I am writing to ask if anyone has also experienced an issue with the alignment of pixmaps in QPushButtons. I have subclassed QPushButton with the following code:</div><div class=""><br class=""></div><div class="">class NXColorButton(QtWidgets.QPushButton):<br class=""><br class=""> def __init__(self, parent=None):<br class=""> super(NXColorButton, self).__init__(parent)<br class=""> self.setFixedSize(20, 20)<br class=""> self.setIconSize(QtCore.QSize(12, 12))<br class=""> pixmap = QtGui.QPixmap(QtCore.QSize(12, 12))<br class=""> pixmap.fill(QtGui.QColor(QtCore.Qt.white))<br class=""> self.setIcon(QtGui.QIcon(pixmap))<br class=""><br class=""></div><div class="">In PyQt 5.9, this produced the following button on the right:</div><div class=""><img apple-inline="yes" id="D03D5214-0A69-45C2-AE37-3B8633F1CE6A" class="" width="322" height="29" src="cid:4208008A-38F2-4656-A550-6F142B88DAA2"></div><div class=""><br class=""></div><div class="">In PyQt 5.14.2, it produces this:</div><div class=""><img apple-inline="yes" id="3636A609-F0B0-4840-BACC-A0B618300630" class="" width="320" height="30" src="cid:20D03483-26D9-42D7-AC80-448F2292DE93"></div><div class=""><br class=""></div><div class="">When I query the sizes, they agree with the values in the code, but although the pixel map is square, the QPushButton below it is clearly not 20x20. It’s rectangular for a start. I can make it nearly square if I increase the size to 30x30. For comparison, the QLineEdit box to the left is 21 pixels high.</div><div class=""><br class=""></div><div class="">I can write up a bug report but I wanted to find out if this is a known issue or easy to fix.</div><div class=""><br class=""></div><div class="">— </div><div class="">Ray Osborn</div></div></body></html>