It's either this or grabbing the widget or forgetting about GL... You can't use GL calls on a non-gl context and if you want a canvas that is different than the widget you have to set it up separately.