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

Qt Doc : Error in a sample code on the Layout Management page

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.0.0
    • Some future release
    • Documentation
    • None
    • I05ebd07a35b6db62b8c12255186f9d9487da79f6

    Description

      2 error find in some sample code in the documentation about the Layout Manager :
      http://doc.qt.nokia.com/latest/layout.html#the-implementation-file

      The Implementation File (card.cpp)

      //#include "card.h"

      First we define count() to fetch the number of items in the list.

      QLayoutItem *CardLayout::count() const
      {
              // QList::size() returns the number of QLayoutItems in the list
          return list.size();
      }

      should become :

      The Implementation File (card.cpp)

      #include "card.h"

      First we define count() to fetch the number of items in the list.

      int CardLayout::count() const
      {
              // QList::size() returns the number of QLayoutItems in the list
          return list.size();
      }

      Attachments

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

        Activity

          People

            mitch_curtis Mitch Curtis
            vinorcola Kévin PERAIS
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes