Hi, I am starting a little game project, a 2D RPG using Qt and OpenGL. I am just starting and would like to have an Art class, which would contain all the arts (textures, sprites, images in general) in the game. The art is to be stored in a hashtable (a pixmap is an image) :
QHash<QString, QPixmap> images;
and recupering the desired image with the following method :
I'm not sure what will happen if you put the first snippet in a header. Possibly a redefinition error. From the second snippet, you put the class part in a header and then declare all static member variables in some cpp.