I always thought Q were a very very VERY far future humans.
And 24th century was a place where some important evolutional steps are to be taken....and Q was there to make sure they are taken
I never believed there was something magical or omnipotent about them. You know, any sufficiently advanced technology will appear like a magic to sufficiently underdeveloped observer. This view on Q I confirmed for myself, when they had that funny "civil war" amd basically what they were doing they shot supernovas at each other