update WidgetFunction.cpp