diff -r da70caa2246d -r 16e8c2896469 eric7/Project/CreateDialogCodeDialog.py --- a/eric7/Project/CreateDialogCodeDialog.py Tue Jun 08 19:29:24 2021 +0200 +++ b/eric7/Project/CreateDialogCodeDialog.py Tue Jun 08 19:33:51 2021 +0200 @@ -510,8 +510,9 @@ for childRow in range(topItem.rowCount()): child = topItem.child(childRow) if ( - child.checkState() and - child.flags() & Qt.ItemFlag.ItemIsUserCheckable + child.checkState() == Qt.CheckState.Checked and + (child.flags() & Qt.ItemFlag.ItemIsUserCheckable == + Qt.ItemFlag.ItemIsUserCheckable) ): slotsCode.append('{0}\n'.format(indentStr)) slotsCode.append('{0}{1}\n'.format(