Oops, my bad. I indeed meant setWindowModality().