The keys may be intercepted globally by some other application (like the desktop or the system itself) but my remarks on the paint event still stand.
The keys may be intercepted globally by some other application (like the desktop or the system itself) but my remarks on the paint event still stand.
The first thing to test is to see if your application does indeed the get key events.t why not for F10 and F11?
Set a break point in your keyPressEvent(), and see if they are being caught.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Thanks for everyone. Need to call update function now its working fine and below is the code snippet
Qt Code:
switch ( event->key() ) { case Qt::Key_F11: nextBoltHoleCircle = TRUE; update(); break; case Qt::Key_F10: prevBoltHoleCircle = TRUE; update(); break; case Qt::Key_Enter: needToDrawCircle = TRUE; update(); break; default: }To copy to clipboard, switch view to plain text mode
Best Regards,
Soumya
Last edited by wysota; 23rd February 2010 at 15:01.
Could you tell me if your program works properly if you press F10 or F11 and then start resizing the dialog?
ya its working fine
With the paintEvent() you posted earlier? Or did you change it? Could you post the complete code of your widget here as an attachment?
Hi,
I have sent the entire code in the attachment it works fine
Regards,
Soumya
Last edited by soumya; 26th February 2010 at 08:03.
I'm afraid your application doesn't work on my system, I can't see any "holes" and you disabled resizing the dialog so I don't know how could you say that your application works when the dialog is resizedThe code is broken, believe me.
Bookmarks