Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. Qt on BlackBerry and QNX
  4. Qt5 keyPressEvent(...) not sent to main window

Qt5 keyPressEvent(...) not sent to main window

Scheduled Pinned Locked Moved Qt on BlackBerry and QNX
4 Posts 2 Posters 3.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rondog
    wrote on last edited by
    #1

    I wrote an application for my playbook using Qt 4.8.3 and was quite happy with the result. I did have numerous issues but was able to work through most of them.

    I tried using the latest version of Qt 5.0.1 and found a couple of items were broken. The main window (QMainWindow) no longer received the keyPressEvent(...) event which means that my menu (toolbar?) won't work. The other problem is likely related; the application uses a QGraphicsScene with proxy widgets and they don't accept any input either.

    The same application works fine in Qt4 but it doesn't accept input in Qt5.

    Has anyone run into this? Something in the events or an equivalent to the QInputContext for Qt5 maybe?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tzander
      wrote on last edited by
      #2

      silly question; how do you send key events to a keyboard-less tablet?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rondog
        wrote on last edited by
        #3

        I don' think it is a silly question.

        There is a keyboard that appears when input is required. From the applications point of view it doesn't matter if it is physical or simulated in software.

        You can have a software keyboard even on a desktop application. There is a Qt example of this using a subclass of QInputContext.

        Using a blackberry playbook, if you swipe from the top border into the application a key press event is (supposed) to be generated that is equivalent to pressing the 'Windows' key (Qt::Key_Menu,Qt::Key_Meta).

        If you cannot have a key press on a tablet then it is an expensive paper weight because you can't do anything else with it.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Rondog
          wrote on last edited by
          #4

          I went back and re-read the notes on building Qt for Blackberry.

          It does mention that it is targeting Blackberry 10 and not so much the playbook. It also recommends using 4.8.x

          From what I have found version 4.8.3 is the latest Qt version that you can use if your target is a playbook (version 2.1). Every version higher has some really strange issues (maybe unsolvable at the application level).

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved