State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:448081|
Problem summary
setFixedHeight() and setMaximumHeight() functions behave differently with QGroupBox objects in Hiero/Nuke 12.1, and later, compared to 12.0
Customer reported version
Hiero 12.1v4
Customer reported platform
Windows 10
Steps to reproduce
1) Open Hiero or Nuke
2) Run the following code in the Script Editor
from PySide2 import QtWidgets
class Hero(QtWidgets.QMainWindow):
def __init__(self, parent=None):
QtWidgets.QMainWindow .__init__(self, parent)
mainWidget = QtWidgets.QWidget()
self.setCentralWidget(mainWidget)
self.mainWidgetLayout = QtWidgets.QVBoxLayout()
mainWidget.setLayout(self.mainWidgetLayout)
self.populate()
def populate(self):
buttonsGroupBox = QtWidgets.QGroupBox()
buttonsGroupBox.setFixedHeight(48)
buttonsHLayout = QtWidgets.QHBoxLayout()
buttonsHLayout.setSpacing(0)
buttonsGroupBox.setLayout(buttonsHLayout)
self.someButton = QtWidgets.QPushButton()
self.someButton.setObjectName('someButton')
self.someButton.setText("Save Project")
buttonsHLayout.addWidget(self.someButton)
self.mainWidgetLayout.addWidget(QtWidgets.QWidget())
self.mainWidgetLayout.addWidget(buttonsGroupBox)
mainWindow = Hero()
mainWindow.show()
RESULT:

setFixedHeight() to setMaximumHeight() (line 14 in the above example) also reproduces this problem.

setFixedHeight()/setMaximumHeight() function, or by removing the function completely. In this case, the following line (line 14):buttonsGroupBox.setFixedHeight(48)
Reproduced by support
This bug has been reproduced in:
Nuke 12.2v2 - Windows 10 - Linux CentOS 7
Nuke 12.1v1 - Windows 10 - Linux CentOS 7 - Regression
Unable to reproduce bug in:
Nuke 12.0v7 - Windows 10 - Linux CentOS 7
Earliest version tested
Nuke 12.0v7
- This issue doesn't appear in this version and has regressed
We're sorry to hear that
Please tell us why