This is not a Qt issue, but a general C++.
Google about exporting classes in DLLs.
In Qt, if you use Qt creator or the VisualStudio add in, you can select a project type which is a Qt library.
It will automatically add the correct export/import defines to your class declarations - but you should really first read about it and understand the general concept and how it works.