qt - What's difference between class QWebView; vs. #include <QWebView> -
what's difference between these defining;
#include "qwebview" class qwebview;
class qwebview;
called forward declaration. means, can't access details of class (like methods/public variables) until type declared. forward declaration, tells compiler that particular type exists, whereas full include tells compiler, methods etc. class provides.
if wan't use type in declaration, it's fine. soon, call method on variable of type qwebview
, error, if don't include full declaration.
Comments
Post a Comment