Results 1 to 4 of 4

Thread: QtWebView call c++ functions on Android

  1. #1
    Join Date
    Dec 2007
    Location
    London
    Posts
    206
    Thanks
    40
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default QtWebView call c++ functions on Android

    Hi All,

    I need to call some c++ functions from webview. Using QWebEngineView with QWebchannel was a great option until I realized that QWebEngineView is not supported on Android. So the only thing I have is QtWebView...

    I googled for hours, but I couldn't find any answer.

    Isn't there any way to call c++ procedures from QtWebView on "Android".

    Thanks in advance

  2. #2
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QtWebView call c++ functions on Android

    Android Studio, the official IDE from Google, is not only java....
    https://www.sitepoint.com/using-c-an...-with-the-ndk/

    or

    https://github.com/search?l=C%2B%2B&...utf8=%E2%9C%93

    or QT QXmlQuery mixed...
    this is so many way....

    Qt Code:
    1. QDateTime timer1( QDateTime::currentDateTime() );
    2. StreamBuf *buf = new StreamBuf();
    3. QXmlQuery xquery(QXmlQuery::XSLT20);
    4. xquery.setFocus(QUrl("http://www.qtcentre.org/external.php?type=RSS2&forumids=2"));
    5. xquery.bindVariable("unixtime", QVariant(timer1.toTime_t()));
    6. xquery.bindVariable("ddate", QVariant(timer1.toString()));
    7. xquery.bindVariable("pathinfoapp", QVariant( qApp->applicationDirPath() ));
    8. xquery.setQuery(QUrl("https://raw.githubusercontent.com/pehohlva/DocSpeacker/master/src/resource/browser_rss.xsl"));
    9. xquery.evaluateTo(buf->device());
    10. _doc->setHtml ( buf->data() );
    11. ///// from https://github.com/pehohlva/DocSpeacker/blob/master/3rdparty/oldtimer/DrawDocument/main.cpp
    To copy to clipboard, switch view to plain text mode 

    I find so many way on target android..
    What do you want to do or reach?

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

    yagabey (4th August 2017)

  4. #3
    Join Date
    Dec 2007
    Location
    London
    Posts
    206
    Thanks
    40
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: QtWebView call c++ functions on Android

    Thanks, i will have a look..

  5. #4
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QtWebView call c++ functions on Android

    you're welcome ....
    in my mac box i have install two version from qt desktop + mobile device... and i switsh
    from qt version qt5.9 to qt5.5(latest wo webkit is inside...
    in my long .bash_profile file i set so many aliases to work.

    Qt Code:
    1. # latest qt 5.1 + webkit in latest having !
    2. # export PATH="/usr/local/opt/qt@5.5/bin:$PATH"
    3. # export PATH="/usr/local/opt/qt5/bin:$PATH"
    4.  
    5. # latest qt 5.9.2
    6. # export PATH="/Users/dev/Applications/qt5.9.1/bin:$PATH"
    7. # export PATH="/Users/dev/Applications/qt5.9.1/bin:$PATH"
    8. #
    9. # Setting PATH for Python 3.6
    10. # The original version is saved in .bash_profile.pysave
    11. # active qt QTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQT
    12. # export PATH="/Users/dev/Applications/qt5.9.1/bin:$PATH"
    13. export PATH="/usr/local/opt/qt@5.5/bin:$PATH"
    14. # active qt QTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQTQT
    15. # swap or edit this file!
    16. # MYSQL
    17. export PATH="/usr/local/mysql/bin:$PATH"
    18. alias swap='cd && ls && atom .bash_profile'
    19. alias viswap='cd && vi .bash_profile'
    20. PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
    21. export PATH
    22.  
    23. alias go='cd /Users/dev/sandbox' # go to git dir qt C C++ &&
    24. alias w1='cd /Users/dev/Sites/' # go to nix server & php
    25. alias load='source ~/.bash_profile' # reload the file here
    26. alias pip3='python3.6'
    27. alias python='python3.6'
    28. alias dfind='analizedir'
    To copy to clipboard, switch view to plain text mode 

    have a look by https://gist.github.com/natelandau/10654137

    to make live simply ..

    nice day...

Similar Threads

  1. Replies: 0
    Last Post: 5th July 2017, 04:26
  2. Replies: 3
    Last Post: 4th January 2016, 22:18
  3. Replies: 5
    Last Post: 10th March 2011, 18:16
  4. Cannot call OpenCV 2.0 functions inside Qt slots
    By Asfer in forum Qt Programming
    Replies: 2
    Last Post: 19th February 2010, 11:48
  5. Replies: 3
    Last Post: 4th March 2008, 08:35

Tags for this Thread

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.