Finally, I found the solution:
First, make a rgba array for QImage, the length of it must be 4 times of image width * image height.
Second, use gs_texture_create and gs_texture_set_image to create & set texture from rgba array above.
Then you can render the texture in the context!