Hi all
If anyone is interested this is my solution of Q_EXPORT macro problem 
qfocusdata.h
#ifndef QFOCUSDATA_H
#define QFOCUSDATA_H
#ifdef Q_WIN
#include <qwindowsystem_qws.h>
#ifdef LIBAPP_EXPORTS
#define LIBAPP_API __declspec(dllexport)
#else // !LIBAPP_EXPORTS
#define LIBAPP_API __declspec(dllimport)
#endif // LIBAPP_EXPORTS
#else
#define LIBAPP_API // Q_EXPORT = LIBAPP_API
#endif
// all You see hire is copy from Qt help pages;
http://web.mit.edu/qt/www/qfocusdata-h.html
and
http://lists.trolltech.com/qt-interest/2004-12/thread00790-0.html
#ifndef QT_H
#include <QWidgetList> // "qwidgetlist.h"
#endif // QT_H
class LIBAPP_API QFocusData {
public:
//QWidget* focusWidget() const { return it.current(); }
// current is not supported by QWidget but it is up to You- i do not need it.
int count() const { return focusWidgets.count(); }
private:
QFocusData() : it(focusWidgets) {}
QWidgetList focusWidgets;
QWidgetList it;
};
#endif // QFOCUSDATA_H
qfocusdata.h
#ifndef QFOCUSDATA_H
#define QFOCUSDATA_H
#ifdef Q_WIN
#include <qwindowsystem_qws.h>
#ifdef LIBAPP_EXPORTS
#define LIBAPP_API __declspec(dllexport)
#else // !LIBAPP_EXPORTS
#define LIBAPP_API __declspec(dllimport)
#endif // LIBAPP_EXPORTS
#else
#define LIBAPP_API // Q_EXPORT = LIBAPP_API
#endif
// all You see hire is copy from Qt help pages;
http://web.mit.edu/qt/www/qfocusdata-h.html
and
http://lists.trolltech.com/qt-interest/2004-12/thread00790-0.html
#ifndef QT_H
#include <QWidgetList> // "qwidgetlist.h"
#endif // QT_H
class LIBAPP_API QFocusData {
public:
//QWidget* focusWidget() const { return it.current(); }
// current is not supported by QWidget but it is up to You- i do not need it.
QWidget* home();
QWidget* next();
QWidget* prev();
QWidget* first() const;
QWidget* last() const;
int count() const { return focusWidgets.count(); }
private:
friend class QWidget;
QFocusData() : it(focusWidgets) {}
QWidgetList focusWidgets;
QWidgetList it;
};
#endif // QFOCUSDATA_H
To copy to clipboard, switch view to plain text mode
Bookmarks