Hi all
If anyone is interested this is my solution of Q_EXPORT macro problem
Qt Code:
  1. qfocusdata.h
  2.  
  3. #ifndef QFOCUSDATA_H
  4. #define QFOCUSDATA_H
  5.  
  6. #ifdef Q_WIN
  7. #include <qwindowsystem_qws.h>
  8. #ifdef LIBAPP_EXPORTS
  9. #define LIBAPP_API __declspec(dllexport)
  10. #else // !LIBAPP_EXPORTS
  11. #define LIBAPP_API __declspec(dllimport)
  12. #endif // LIBAPP_EXPORTS
  13. #else
  14. #define LIBAPP_API // Q_EXPORT = LIBAPP_API
  15. #endif
  16. // all You see hire is copy from Qt help pages;
  17. http://web.mit.edu/qt/www/qfocusdata-h.html
  18. and
  19. http://lists.trolltech.com/qt-interest/2004-12/thread00790-0.html
  20.  
  21. #ifndef QT_H
  22. #include <QWidgetList> // "qwidgetlist.h"
  23. #endif // QT_H
  24.  
  25.  
  26. class LIBAPP_API QFocusData {
  27. public:
  28. //QWidget* focusWidget() const { return it.current(); }
  29. // current is not supported by QWidget but it is up to You- i do not need it.
  30. QWidget* home();
  31. QWidget* next();
  32. QWidget* prev();
  33. QWidget* first() const;
  34. QWidget* last() const;
  35. int count() const { return focusWidgets.count(); }
  36.  
  37. private:
  38. friend class QWidget;
  39. QFocusData() : it(focusWidgets) {}
  40. QWidgetList focusWidgets;
  41. QWidgetList it;
  42. };
  43.  
  44. #endif // QFOCUSDATA_H
To copy to clipboard, switch view to plain text mode