Results 1 to 20 of 36

Thread: virtual keyboard in QT Application

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2012
    Posts
    136
    Thanks
    2
    Thanked 27 Times in 24 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: virtual keyboard in QT Application

    I made the project on a windows machine and a visual studio compiler. It looks like the compiler you are using won't allow temp variables in function calls
    I don't have a mac to try it on.
    Mabe you can find more when googling the error description (QString' cannot bind to a temporary of type 'QString) or start a thread in the newbe section of the forum.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: virtual keyboard in QT Application

    Instead of taking the address of a temporary QVariant, make it a local variable and take its address.

    In the second error, you are required to pass a reference to a QString. You are trying to pass the return value of a function, which is also a temporary.
    Again, make a local variable, initialiize it with the result of the function and then pass the variable to the validate method.

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    srm (24th March 2015)

  4. #3
    Join Date
    Mar 2015
    Posts
    2
    Thanks
    1
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11

    Default Re: virtual keyboard in QT Application

    Thanks for the pointers. I was able to fix the error messages as per your suggestion.
    For example
    emit dataSet(&QVariant(ui->edValue->text()));
    became
    QVariant qv = QVariant(ui->edValue->text());
    emit dataSet(&qv);
    But now I'm stuck on how to actually use it. I have absolutely no clue on how to incorporate that into my own app. I did a make install but neither do I know how to activate it, nor how to ensure cross platform functionality.

    So I moved over to give http://qt-apps.org/content/show.php/...content=107388 a try, which was mentioned in earlier in this thread.

    Would be great if you could explain/give a sample app on how to actually use such an extra inputcontext, for the total noobs

  5. #4
    Join Date
    May 2012
    Posts
    136
    Thanks
    2
    Thanked 27 Times in 24 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: virtual keyboard in QT Application

    There is a howto on the first page of this thread

  6. #5
    Join Date
    Nov 2015
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: virtual keyboard in QT Application

    hi,thanks for the virtual keyboard
    Last edited by kiran prabhu; 25th November 2015 at 08:18.

  7. #6
    Join Date
    Mar 2016
    Posts
    6
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: virtual keyboard in QT Application

    This looks very useful. I've been trying out the latest VIInputContext class. Any chance you can add some clarification on usage with a mainwindow widget?
    I put this in my mainwindow.h
    VIInputContext inputdevice;
    and in the constructor I do this
    ui->lineEdit->setProperty("keyboard",true);


    But, I must be missing something as when I click in the lineEdit box nothing happens.

Similar Threads

  1. virtual keyboard application : errror during cross-compile
    By sanjeet in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 31st August 2011, 08:48
  2. How to get the virtual keyboard?
    By ramesh.bs in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 2nd June 2010, 11:58
  3. Virtual Keyboard?
    By augusbas in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 14th July 2009, 08:55
  4. Virtual Keyboard
    By Micawber in forum Qt Programming
    Replies: 1
    Last Post: 3rd September 2007, 19:59
  5. virtual keyboard
    By sar_van81 in forum Qt Programming
    Replies: 5
    Last Post: 22nd December 2006, 13:40

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
  •  
Qt is a trademark of The Qt Company.