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

A bug in the code given in documentation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 4.8.0
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:
      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

            Assignee:
            docteam Qt Documentation Team
            Reporter:
            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