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

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -