add a workaround for min/max layout issue on Qt5