[Qt] Help - Event KeyPress

Trx TX trx at devbin.org
Wed Mar 21 17:09:05 CET 2012


  1.. procedure TLineNum.KeyPressEvent(KeyCode: QKeyEventH);
  2.. begin
  3..   if Assigned(FKeyPress) then
  4..     begin
  5..        //QLineEdit_setText(Handle, at TKeyCode);
  6..        FKeyPress(Handle, IntToStr(QKeyEvent_key(KeyCode));); // <------- this line is the problem
  7..     end;
  8.. 
  9.. end;
----- Original Message ----- 
  From: Abraham 
  To: Items specific to the Qt widget set 
  Sent: Wednesday, March 21, 2012 5:51 AM
  Subject: [Qt] Help - Event KeyPress


  Hello people.

  I need your help, I'm trying to do my own class QLineEdit and implementing the keypress event, every time I use my class when you press a button the program closesautomatically, this is my code.

  http://pastebin.com/YeYWS0dN

  Thanks for your help and sorry for my English. 




  ---------------------------------------------------------------------------------------


  Hola gente.


  necesito de su ayuda, estoy intentando hacer mi propia clase QLineEdit y implementando el evento keypress, cada vez que uso mi clase al momento de presionar una tecla el programa se cierra automaticamente, este es mi codigo.


  http://pastebin.com/YeYWS0dN


  Gracias por su ayuda y disculpen mi ingles.


  -------------------
  Abraham Montaño
  Chiclayo - Perú

  ---------------------




------------------------------------------------------------------------------


  _______________________________________________
  Qt mailing list
  Qt at lists.lazarus.freepascal.org
  http://lists.lazarus.freepascal.org/mailman/listinfo/qt

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/qt/attachments/20120321/8e7c819d/attachment-0002.html>


More information about the Qt mailing list