I am importing qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); to enable the VirtualKeyboard in main.cpp in my project.
Here, How how to disable the VirtualKeyboard when TextField has active focus.
FYI: If we use InputPanel object then we can restrict it.