title: How to allow QLineEdit from Designer to accept only integer in the range 0 to 255?
body: <p>QT version 5.1    </p>
  
  <p>I have 2 issues:</p>
  
  <p>1) I am wondering is there is any way I can set  <code>QLineEdit</code> widget  to accept only integer in the range from <strong>0 &lt; x &lt; 255</strong> from <strong>QT DESIGNER</strong>. I guess Input Mask can do this thing for us but wondering how ?</p>
  
  <p>2) Only if we can't set values from QT designer, then in that case I have to do it from the source code. For that in which files will i make the changes?</p>
  
  <p>Below is brief description of my project:</p>
  
  <p>i) I have designed a GUI on QT designer with lots of <code>QLineEdit</code> widgets and buttons, checkbox etc. </p>
  
  <p>ii) I am aware that there is <code>QValidator</code> class exist which can solve my problem . I know how to use <code>QValidator</code> but wondering just in case if I can't  set validation of <code>QLineEdit</code> from Gui then I have to do it from source code. This is not a problem but where will I add my validation code in source code? </p>
  
  <p>Should I add this  in the constructor of GUI?</p>