Reputation: 57
I'm trying to check if the user's input is alphanumeric. I tried using isalnum but it always shows this error:
AttributeError: 'QString' object has no attribute 'isalnum'
what would be the best way to know if a string is alphanumeric in QString? Thank you!
Upvotes: 0
Views: 415
Reputation: 2427
Casting to str and then checking should work
str(QString).isalnum()
Upvotes: 1