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

A bug in the code given in documentation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.8.0
    • Documentation
    • None

    Description

      The code provided in documentation page http://qt-project.org/doc/qt-4.8/model-view-programming.html#view-classes has a bug. The code:

      int main(int argc, char *argv[]){

      QApplication app(argc, argv);

      // Unindented for quoting purposes:
      QStringList numbers;
      numbers << "One" << "Two" << "Three" << "Four" << "Five";

      QAbstractItemModel *model = new StringListModel(numbers);

      Here the StringListModel should be QStringListModel.

      Attachments

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

        Activity

          People

            docteam Qt Documentation Team
            hkaraoguz Hakan Karaoguz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes