Permalink
Browse files

Enforce maximum length on QtField.

  • Loading branch information...
1 parent 5d84e36 commit 73d0ba46df05b1d3fcf77ba326663b59eb311a52 David Wyde committed Sep 27, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 enaml/widgets/qt/qt_field.py
@@ -43,6 +43,10 @@ def initialize_widget(self):
self.update_text()
parent._modified = False
self.set_cursor_position(parent.cursor_position)
+
+ max_length = parent.max_length
+ if max_length:
+ self.set_max_length(max_length)
self.bind()
def parent_max_length_changed(self, max_length):

0 comments on commit 73d0ba4

Please sign in to comment.