I observed this today and thought why does the debug.log open twice. It seems that my naming with on_openDebugLogfileButton_clicked() is somehow internally used by Qt. So we had a connect() which uses on_openDebugLogfileButton_clicked() on clicked() and the internal stuff, which resulted in that strange behaviour. After renaming the function to on_openDebugLogfileBtn_clicked() the debug.log opens only once, as intended.
I stumpled upon this as on_lineEdit_returnPressed() is used in no connect and only the function declaration and definition exists.