How to prevent a user from entering anything other than a URL in QLineEdit
?
Situation: we need a form (not necessarily QLineEdit
, but I have not found a special form for links), which will not allow the user to enter anything other than links. I saw forms that allow only the input of numbers, not letters. You need something like this, only for links. In this case, when checking is not necessary to connect to the Internet. I know about the QUrl
class, but its isValid () method skips non-working URLs for some reason.
isValid
method checks the URL for compliance with this standard. Give examples of broken URLs that theisValid
method skips. - maestro