Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-77223

Documentation improvement for QVBoxLayout

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.13.0
    • Fix Version/s: 5.13
    • Component/s: Documentation
    • Labels:
      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?

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            vertries Nico Vertriest (Inactive)
            Reporter:
            e0101981 Janne Anttila
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes