Qt5 compatibility

1. .pro + widgets webkitwidgets
2. QtGui => QtWidgets
3. remove QTextCodec methods
4. Q_WS_MAC => Q_OS_MAC
5. connect syntax
6. QVariant((int)Qt::cyan) (maybe not work)