What is the difference between these two layout assignee methods
-
I've seen that we can assignee a layout to the widget with these two methods, and I don't know what is the difference
METHOD 1:
box = QtWidget.QWidget() layout = QtWidget.QGridLayout() box.setLayout(layout)
METHOD 2:
box = QtWidget.QWidget() layout = QtWidget.QGridLayout(box )
are they the same?
-
I've seen that we can assignee a layout to the widget with these two methods, and I don't know what is the difference
METHOD 1:
box = QtWidget.QWidget() layout = QtWidget.QGridLayout() box.setLayout(layout)
METHOD 2:
box = QtWidget.QWidget() layout = QtWidget.QGridLayout(box )
are they the same?
@Pythonic-person said in What is the difference between these two layout assignee methods:
are they the same?
Yes, according to the documentation.