Yes the cast makes perfect sense.  Let's unpick this a little more:
QSqlQuery q;
enum MyEnumType;
const auto v1 = q.value(2);  // I don't know what the type of v1 will be.
                             // See the QSqlQuery docs.
const auto v2 = v1.toInt();  // v2 is going to be an int or a long or something.
obj.setMyEnumType(v2);       // Error: setMyEnumType doesn't take an int argument.
const auto e = static_cast<MyEnumType>(v2);
obj.setMyEnumType(e);        // OK.  Argument is now the right type.
Edit: Ah-ha!  I see now you were asking an entirely different question.  The question you were really asking is a duplicate of What is the difference between static_cast<> and C style casting?
Always prefer static_cast because a) a code reviewer will be prompted to think "what happens if the value is out of range?"; b) a code reviewer won't have to think "is this a static_cast, a reinterpret cast, a const cast, or some combination of all three - and is it safe?"