re-arranged functions into run order
added one liner for Qt5Gui