QR code based enrollment is available on Android 7 and above. On Android 4-6 (and MIUI), you can install Headwind MDM launcher as an APK file (open https://h-mdm.com, click Download, find the "Android application" section).
Before installation, you must permit installation from unknown sources. After installation, provide all permissions asked by the launcher.
Here's a video related to the installation without QR code based enrollment on Xiaomi: https://www.youtube.com/watch?v=hAqop4YKUdk