Results 1 to 4 of 4

Thread: qml qtwebkit svg mouse click

  1. #1
    Join Date
    Oct 2010
    Location
    Iran
    Posts
    27
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default qml qtwebkit svg mouse click

    Hi
    I am creating qml simple webview and use svg button in my web page but "mouse click" not work (mouseover event is working).
    how to resolve this problem ?

  2. #2
    Join Date
    Oct 2010
    Location
    Iran
    Posts
    27
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: qml qtwebkit svg mouse click

    sample code with chart demo (HTML5 jquery SVG):

    Qt Code:
    1. import QtQuick 1.0
    2. import QtWebKit 1.0
    3.  
    4. Rectangle {
    5. width: 1270
    6. height: 768
    7. color: "#d92f2f"
    8. WebView {
    9. id : webView
    10. settings.pluginsEnabled: true
    11. url: "http://www.highcharts.com/stock/demo/"
    12. preferredWidth: 1270
    13. preferredHeight: 768
    14. scale: 1
    15. smooth: false
    16. }
    17. }
    To copy to clipboard, switch view to plain text mode 

    zoom button not work!!?

  3. #3
    Join Date
    Jul 2012
    Posts
    1
    Thanked 1 Time in 1 Post

    Default Re: qml qtwebkit svg mouse click

    Hi,
    Just figure out, might be useful for someone. We need to change the source of highchart.js(or highchart.src.js, whatever we are using)
    Basically, highchart thinks that QTwebkit is touch-enabled.

    // Vinh Vo : Fix to work with Qwebkit. Original : doc.documentElement.ontouchstart !== UNDEFINED
    hasTouch = (doc.documentElement.ontouchstart !== UNDEFINED&& doc.documentElement.ontouchstart!=null),

  4. The following user says thank you to vinhvo for this useful post:

    jh (30th August 2012)

  5. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    84
    Thanks
    7
    Thanked 2 Times in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qml qtwebkit svg mouse click

    great! i also had this problem using highcharts and qwebkit and your hint solved it! thanx a lot!

Similar Threads

  1. Simulate mouse click
    By Merylin in forum Qt Programming
    Replies: 8
    Last Post: 18th March 2014, 03:27
  2. RegisterHotKey with mouse click
    By mksuper3 in forum Qt Programming
    Replies: 0
    Last Post: 31st August 2011, 10:32
  3. Get mouse position on click?
    By N3wb in forum Qt Programming
    Replies: 2
    Last Post: 21st August 2010, 23:33
  4. cancle right click context menu in qtwebkit
    By umen in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2009, 21:06
  5. mouse click event
    By vijay anandh in forum Qt Programming
    Replies: 1
    Last Post: 1st May 2006, 09:24

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.