Sleep in Qt

Somehow got very distracted from Qt. And then the other day had to come back =) Spent a long time remembering how I used to implement delays, or sleep in Qt (yes, yes, yes, it's bad, etc., but sometimes you really need it, especially if you need to turn in a lab to make others stop bothering you.)

Example of a trivial implementation:

#include "QThread"
class Sleeper: public QThread
    static void msleep(int ms)



Another plus in favor of the above code is its cross-platform nature, unlike Sleep() or something similar from the standard library.