Fixed compatibility with Qt4.