[Qt-interest] When is QT_FORWARD_DECLARE_CLASS to be used?

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Sat Apr 18 07:26:24 CEST 2009


Hi Everybody, 

In 4.5.0, demos\books\bookdelegate.h has: 

#ifndef BOOKDELEGATE_H
#define BOOKDELEGATE_H

#include <QModelIndex>
#include <QPixmap>
#include <QSize>
#include <QSqlRelationalDelegate>

QT_FORWARD_DECLARE_CLASS(QPainter)

class BookDelegate : public QSqlRelationalDelegate
{
public:

... etc. 


Is QT_FORWARD_DECLARE_CLASS also required in our code?  

It's not in the QtAssistant index, and searching only provides links to demos. 

Can someone provide the missing documentation. 

Thanks, 

Tony.






More information about the Qt-interest-old mailing list