Linux graphic stack is a wide and complex ecosystem.
you have a general overview here :
or a more complete and technical one from Stephane Marchesin which is one of the nouveau hackers.
Basically, graphics toolkits (Qt, Gtk, efl, etc..) talk with Xorg. XOrg use libdrm to interact with the kernel DRM infrastructure which stands upon and abstract video card drivers (nouveau, i915, ..).