Qt gui added and template matching