Hello Ran,
You could use the method on the link as it’s part of Qt’s official documentation, so it should work.
That being said, you can force Yocto to take a specific recipe version or specific dependencies with the VERSION and DEPENDS variables. You could look at the Yocto documentation for this.
I hope this helps!
Regards,