Reading the documentation, it appears it's as simple as calling music->state()
and ... checking the state.
if (music->state() == Phonon::PlayingState) {
...
You'll also note there's a number of Signals that would let you manage this in your application, specifically the stateChanged signal.