Using the command qApp->setStyleSheet("/* */") removes the QTabBar::close-button from the tab. The close functionality is still maintained, but the button is invisible.
This is a regression from 5.8 to 5.9 and was originally reported as
QTBUG-61092, which was only superficially fixed in 5.9.2 and the issue closed. Reopening the issue was apparently the wrong thing to do (see last comment to QTBUG-61742).