Fix build error

Must include QObject to get the definition for Q_OBJECT. But according to the
documentation, Q_OBJECT should only be used for objects derived from QObject so
use Q_GADGET instead. Don't really know why it is needed at all, but this
builds at least.