Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. QGraphicswebview and plugin

QGraphicswebview and plugin

Scheduled Pinned Locked Moved Qt WebKit
8 Posts 2 Posters 5.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.
  • M Offline
    M Offline
    mprakash
    wrote on 8 Dec 2010, 08:27 last edited by
    #1

    Hi I have one plugin which is basically a subclass of QLineEdit and QPushButton, I am using this in my application which uses QWebView it works great there. In another application we are using QGraphicsWebView and we want to use few of our existing plugin in which are QWidget based so to have these plugin widgets in our QGrpahicsWebView we are using QGraphicsProxyWidget but this is not woking good as the same plugin widget works with QWebView. I am using it same way as it says in documentation that I can set my QWidget to GraphicsProxyWidget, i.e. QGraphicsProxyWidget.setWidget(myPushButton).
    I am unable to get button clicked signal in my javascript function. I am trying to figure out what step did I miss? becausae exact same plugin widget works good with QWebView. I even subclassed QGraphicsProxyWIdget and added the exact same signal "clicked" in hope that it will do that job but even this also does not work.
    Can any one please let me know if I need to do somethign special to get it working.

    Prakash

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on 8 Dec 2010, 09:59 last edited by
      #2

      should work to my knowledge, can you post some test code that replicates this problem, someone can dig further

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Immii
        wrote on 20 Dec 2010, 23:46 last edited by
        #3

        Ah I am having almost same problem, but I am not using nay proxywidget.
        can you please let me know when you find some solution?

        1 Reply Last reply
        0
        • I Offline
          I Offline
          Immii
          wrote on 23 Dec 2010, 00:37 last edited by
          #4

          were you able to fix this problem ?? I had similar problem as I said above and i found a solution. Can you try making conection when the whole document gets loaded. I mean you can do your connect after onload()

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mprakash
            wrote on 23 Dec 2010, 01:37 last edited by
            #5

            I am unable to see onload() function any where in QtAssistant, do you by any chance mean loadFinished() signal? Please note that I am not using QWebView and my plug-in widgets are all QPushButton.

            1 Reply Last reply
            0
            • I Offline
              I Offline
              Immii
              wrote on 23 Dec 2010, 01:52 last edited by
              #6

              onload() function is not in Qt Assistant because it is not Qt api, I am talking about JavaScript onload.

              You can add your event listener and connect all your signals in that, thats the way all signals will be initialized. you can do like this

              @<body>

              function myFunction()
              {
              myObject.mysignal.connect(alert("Hello world I got my signal"));
              }@

              update: it is like in body element you put onLoad=myFunction()

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mprakash
                wrote on 23 Dec 2010, 07:34 last edited by
                #7

                Thank you immii This does the trick, as well I exported my QWebPage object and did the connection for other plugin object against the signal of QWebPage::loadFinished(), that also works, I am kind of confuse now which approach is better and which one should I keep in my code. Qt Assistant does talk about loadFinished() but no where I found any thing which talks about onLoad() in body element so I am stickging wint loadFinished at the moment.

                1 Reply Last reply
                0
                • I Offline
                  I Offline
                  Immii
                  wrote on 23 Dec 2010, 07:53 last edited by
                  #8

                  Well that is possible, but not guaranteed in my opinion because what if the initialization for the loadFinished() signal fails, then all of your other signals which you are connecting against this will also fail. So If I were you I would have gone with onLoad().

                  1 Reply Last reply
                  0

                  • Login

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