Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.13.0
-
None
Description
Received via feedback@qt.io:
In the URL https://doc.qt.io/qtforpython/tutorials/basictutorial/dialog.html, Under https://doc.qt.io/qtforpython/tutorials/basictutorial/dialog.html#create-a-layout-to-organize-the-widgets anchor - "Qt comes with layout-support that helps you organize the widgets in your application. In this case, let’s use QVBoxLayout to lay out the widgets vertically. Add the following code to the init() method, after creating the widgets:", while showing the following code:
# Create layout and add widgets layout = QVBoxLayout() layout.addWidget(self.edit) layout.addWidget(self.button) # Set dialog layout self.setLayout(layout)
This will instantly end up in error, even after following the previous instructions perfectly. The reason is QVBoxLayout is not yet imported within the code snippets.
For a beginner - it might be confusing, so maybe this part can be rewritten with instructions to import the necessary libraries?