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

Incorrect documentation of "QGLColormap::size() const " and "QGLColormap::setEntry(int, unsigned int) " functions

XMLWordPrintable

    • 1575462bf90851fb134db4892e93c04b396543f1

      This task (#244151) has been closed, but I'm sure that your
      documentation isn't correct
      (http://doc.trolltech.com/4.5/qglcolormap.html#details).

      Example of use from documentation:

      #include <QApplication <http://doc.trolltech.com/4.5/qapplication.html>>
      #include <QGLColormap>

      int main()

      { QApplication app(argc, argv); MySuperGLWidget widget; // a QGLWidget in color-index mode QGLColormap colormap; // This will fill the colormap with colors ranging from // black to white. for (int i = 0; i < colormap.size(); i++) colormap.setEntry(i, qRgb(i, i, i)); widget.setColormap(colormap); widget.show(); return app.exec(); }

      In this example the program does not enter to the cycle at all, because
      colormap was empty and colormap.size() = 0 before the cycle. So colormap
      can't be filled such way and this example isn't correct.

      Also no arguments are collected for app(argc, argv) from "int main()".

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

            cvandonderen Casper van Donderen
            janichol Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes