Qt: trim the MRL before validating its content (fix #9289)

The default implementation of QLineEdit only calls the fixup method if the
user presses Enter and the content is not currently valid.