actually import/export specifiers are used only on windows on Linux they have no effect.
take a look at QTDIR/src/corelib/global/qglobal.h where you can find Q_DECL_EXPORT/Q_DECL_IMPORT macros
#ifndef Q_DECL_EXPORT
# ifdef Q_OS_WIN
# define Q_DECL_EXPORT __declspec(dllexport)
# elif defined(QT_VISIBILITY_AVAILABLE)
# define Q_DECL_EXPORT __attribute__((visibility("default")))
# endif
# ifndef Q_DECL_EXPORT
# define Q_DECL_EXPORT
# endif
#endif
#ifndef Q_DECL_IMPORT
# if defined(Q_OS_WIN)
# define Q_DECL_IMPORT __declspec(dllimport)
# else
# define Q_DECL_IMPORT
# endif
#endif
#ifndef Q_DECL_EXPORT
# ifdef Q_OS_WIN
# define Q_DECL_EXPORT __declspec(dllexport)
# elif defined(QT_VISIBILITY_AVAILABLE)
# define Q_DECL_EXPORT __attribute__((visibility("default")))
# endif
# ifndef Q_DECL_EXPORT
# define Q_DECL_EXPORT
# endif
#endif
#ifndef Q_DECL_IMPORT
# if defined(Q_OS_WIN)
# define Q_DECL_IMPORT __declspec(dllimport)
# else
# define Q_DECL_IMPORT
# endif
#endif
To copy to clipboard, switch view to plain text mode
so, if you need to create your own dll you need to specify these macros, see detailes here dll & Qt
Bookmarks