Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]keyboardRectangle() function of QInputMethod always returns a null QRectF
Forum Update on Monday, May 27th 2025

[SOLVED]keyboardRectangle() function of QInputMethod always returns a null QRectF

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.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.
  • A Offline
    A Offline
    antonyprojr
    wrote on 29 Mar 2014, 01:47 last edited by
    #1

    I'm developing a Android application, and I want to know the position and size of the virtual keyboard, to start i used the following code to check if rectangle is NULL:

    @
    QRectF keyrect = qApp->inputMethod()->keyboardRectangle();
    qDebug() << (keyrect.isNull() ? "NULL" : "NOT NULL");
    @

    The problem is: Even with the virtual keyboard shown on the screen, the keyboardRectangle() function return a NULL rectangle.

    I'm missing something, or this is a Qt bug?

    My environment:
    Windows 8.1
    Qt 5.2.1
    Qt Creator 3.0.1

    Targeting Android 2.3.3 ARM

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 30 Mar 2014, 20:23 last edited by
      #2

      Hi,

      You may have found something. You should check the "bug report system":http://bugreports.qt-project.org to see if it's something known

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        antonyprojr
        wrote on 31 Mar 2014, 01:28 last edited by
        #3

        It's related to this bug report: "QTBUG-33713":https://bugreports.qt-project.org/browse/QTBUG-33713

        1 Reply Last reply
        0

        1/3

        29 Mar 2014, 01:47

        • Login

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