I tend to just go:
Qt Code:
  1. #include "myclass.h"
  2. #define DBNAME "MyDatabase"
To copy to clipboard, switch view to plain text mode 

Not very C++y, but it works and its simple. I don't see any reason to use a static variable instead.