Added some checks for Qt5 tabs: the indexChanged event returns a number, not a name.  This code is simply a stop-gap.