Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2012-03

Help - Event KeyPress

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Abraham

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?
---------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20120320/25e13143/attachment.html>

Trx TX
to Abraham
  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;
Earlier message 45 lines
----- 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? --------------------- ------------------------------------------------------------------------------
Abraham
to Trx TX

hello, thanks for your answer.
try using the modification you sent but I still have the same problem, my program
closes every time I press a key while the QLineEdit

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

hola, gracias por tu respuesta.

intente usando la modificacion que enviaste pero sigo con el mismo problema, mi programa se cierra cada vez que presiono una tecla dentro del QlineEdit

-------------------
Abraham Monta?o
Chiclayo - Per?
---------------------

2012/3/21 Trx TX

Show quoted text 68 lines
** 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 http://lists.lazarus.freepascal.org/mailman/listinfo/qt -- This message has been scanned for viruses and dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is believed to be clean. _______________________________________________ Qt mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/qt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20120321/2c974b9c/attachment-0001.html>