How many functions are there in Qt?

For Qt 4.5.1, on Linux:

  1. # This script gives an approximation only!
  2. cd /usr/local/Trolltech/Qt-4.5.1/lib;
  3.     printf 's: ' "$thing";
  4.     nm -D lib$thing.so | grep ' T _ZN' | egrep -v '11qt_metaca[sl][tl]' | wc -l;

  1.          phonon: 424
  2.      Qt3Support: 4744
  3.          QtCore: 2798
  4.          QtDBus: 274
  5.           QtGui: 10272
  6.       QtNetwork: 879
  7.        QtOpenGL: 238
  8.        QtScript: 312
  9.           QtSql: 400
  10.           QtSvg: 114
  11.          QtTest: 62
  12.        QtWebKit: 329
  13.           QtXml: 421
  14.           TOTAL: 21474

About twenty-one thousand.

This data includes functions with C++ linkage exported from the Qt libraries.

It deliberately excludes:

  • “tool” modules – QtDesigner, QtUiTools, QtHelp and QtAssistant
  • inline functions
  • functions which are not exported (e.g. in private classes)
  • functions with C linkage, i.e. `extern “C”`
  • qt_metacall and qt_metacast

Categories: