That's becoming even more weird:
GLFunctions::gl30()->glGenTextures(1, &texHandle);
returns 2 in texHandle.
but for using it in the shader it works for a value of 1 in the bindTexture
GLFunctions::gl30()->glBindTexture(GL_TEXTURE_2D, texHandle-1);
This is driving me nuts.
After some experimenting, the culprit was the MagnificationFilter. Although there were no problem setting the Magnification with QOpenGLTexture::NearestMipMapNearest with float images, with integer images, I had to set to QOpenGLTexture::Nearest.