qplatforminputcontext.h file doesnot exist in qt 5.7



  • i am trying to use a virtual keyboard in raspberry pi using a cross compiled qt. i am trying it in my laptop first.

    when i am including the header

    #include<qpa/qplatforminputcontext.h>
    

    it is showing as
    "no such file or directory"

    i have tried by putting the following in the .pro file

    QT += gui-private
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    

    and also the include path of the qpa file in my .pro.

    the header file qplatforminputcontext.h is present in qtbase->incude->qtgui->5.7.0->qpa

    why is it popping out such an error.
    can anyone please help me with this
    thanks in advance



  • Any private part of Qt (for example this one) comes with a pretty clear disclaimer at the top:

    //
    //  W A R N I N G
    //  -------------
    //
    // This file is not part of the Qt API.  It exists purely as an
    // implementation detail.  This header file may change from version to
    // version without notice, or even be removed.
    //
    // We mean it.
    //
    

  • Qt Champions 2016

    Have you tried checking if the file actually exists? I agree with @VRonin however that I don't see a good reason why you'd need the private headers to begin with. Here's what Thiago Macieira (Qt developer) says on the subject:

    The only reason to subclass one of Qt's QXxxxPrivate classes is if you're
    developing something as part of Qt.

    If you're feeling adventurous, you may want to access one of those classes,
    without deriving from them. But you're still accessing private API and you're
    subject to the "We mean it" comment in the header. Your binary will be tagged
    on Linux as "Qt5_PRIVATE_API" and Linux distros will give you a dirty look.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.