Donnerstag, 6. Mai 2010

Check for correct ip-address in QtCombobox while typing

This can be don with the help of the QRegExpValidator class.

Here is a short example:


Now you can only type in a valid IPv4 Address. The 0.0.0.0 and 255.255.255.255 are accepted as well.

The regexp is from this page.

Keine Kommentare:

Kommentar veröffentlichen