Fixed the Qt 5 related issue with TreeViewWidget (closes #124).