I don't want to render anything, I just need a shared context to upload my textures into

But, assuming that your answer was a rhetorical question it means that I can simply do something like this and it would work?

Qt Code:
  1. tex_upload_ctx_ = new QOpenGLContext();
  2.  
  3. QSurfaceFormat fmt;
  4. tex_upload_ctx_->setFormat(fmt);
  5. tex_upload_ctx_->setShareContext(main_ctx);
  6. tex_upload_ctx_->create();
  7.  
  8. tex_upload_win_ = new QWindow();
  9. tex_upload_ctx_->makeCurrent(tex_upload_win_);
To copy to clipboard, switch view to plain text mode