Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C++
class GALLERYCORESHARED_EXPORT Picture
{
public:
    Picture(const QString& filePath = "");
    Picture(const QUrl& fileUrl);
    int id() const;
    void setId(int id);
    int albumId() const;
    void setAlbumId(int albumId);
    QUrl fileUrl() const;
    void setFileUrl(const QUrl& fileUrl);
private:
    int mId;
    Qurl mFileUrl;
};


What I have tried:

C++
class GALLERYCORESHARED_EXPORT Picture
{
public:
    Picture(const QString& filePath = "");
    Picture(const QUrl& fileUrl);
    int id() const;
    void setId(int id);
    int albumId() const;
    void setAlbumId(int albumId);
    QUrl fileUrl() const;
    void setFileUrl(const QUrl& fileUrl);
private:
    int mId;
    Qurl mFileUrl;
};
Posted
Updated 14-Nov-20 14:55pm
v2
Comments
Afzaal Ahmad Zeeshan 14-Nov-20 17:12pm    
This must be a Qt specific feature, check the documentation for this.

1 solution

Picture is a class and from what you posted it appears that it is not derived from anything.

The GALLERYCORESHARED_EXPORT flag is a modifier defined as a macro. In user code that is going to be defined as __declspec(import) in the windows world if it is part of a DLL and nothing if it is part of a statically linked library (SLL). In the implementation of the class it will be defined as __declspec(export) if it is part of a DLL in the windows world and nothing if it isn't.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900