Results 1 to 3 of 3

Thread: Events - how to

  1. #1
    Join Date
    Nov 2006
    Posts
    96

    Default Events - how to

    Well I'm wondering how to write a program that only has a main window and a little cube in the middle of the window...And by pressing down, up, left, right keys on the keyboard you can move it from one side to the other (inside the main window of course). So can sb tell me where to find that kind of code or paste the code here, or give me just a tip .....

    greetings

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Events - how to

    Reimplement QWidget::keyPressEvent() or use QAccel.

  3. #3
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Events - how to

    To add to the above list use you can use QShortcut also
    We can't solve problems by using the same kind of thinking we used when we created them

Similar Threads

  1. Listening events of a QAxServer module
    By juan in forum Qt Programming
    Replies: 1
    Last Post: 5th February 2008, 14:59
  2. Posting custom events to a subclass of QThread
    By jpn in forum Qt Programming
    Replies: 3
    Last Post: 4th July 2006, 15:49
  3. QStackerWidget and mouse events
    By high_flyer in forum Qt Programming
    Replies: 3
    Last Post: 25th April 2006, 19:25
  4. Discard user input events in QEventLoop.
    By Ben.Hines in forum Qt Programming
    Replies: 2
    Last Post: 17th April 2006, 20:49
  5. Delays in processing events
    By Caius Aérobus in forum Qt Programming
    Replies: 6
    Last Post: 7th April 2006, 12:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.