On Monday 06 December 2010 17:06:11 Matthias Ebel wrote:
> ....Next try.
> i have removed the function createWindow  but still the same problem.
> Perhaps its a other problem too. Now i think its not a good idea to iterate
> through all webElements on the mouseReleaseEvent or ?
> 
> I need that to found a input field when clicked on a html form page.
> So i can add a virtual keyboard.
> 
> Here is my complete Source Code that i have overriden from QWebView.
> 
> 
>      private static final java.util.logging.Logger log = 
> java.util.logging.Logger.getLogger(MLogger.Name);
> 
>      private static final String BROWSER_ACTION_EVAL = "browserEvalString";
>      private UserInterface userInterface;
>      private UIElement element;
>      private QWebElement webElement = null;
> 
>      public WebView(UserInterface userInterface, UIElement element, 
> QWidget parent) {
>          super(parent);
>          this.userInterface = userInterface;
>          this.element = element;
> 
> 
>          
> settings().setAttribute(QWebSettings.WebAttribute.JavascriptEnabled, true);
>          
> settings().setAttribute(QWebSettings.WebAttribute.PluginsEnabled, true);
>          this.linkClicked.connect(this, 
> "clicked(com.trolltech.qt.core.QUrl)");
>          
> page().setLinkDelegationPolicy(QWebPage.LinkDelegationPolicy.DelegateAllLinks);
>      }
> 
> 
>      public void clicked(QUrl arg__) {
>          setUrl(arg__);
>      }
> 
>      @Override
>      protected void mouseReleaseEvent(QMouseEvent arg__1) {
> 
>          log.log(Level.FINEST, "mouseReleaseEvent");
>          if (page() == null) {
>              log.log(Level.FINEST, "page is null");
>              return;
>          }
>          QWebFrame frame = page().currentFrame();
>          if (frame != null) {
>              log.log(Level.FINEST, "iterate input elements");
>              QWebElementCollection collection = 
> frame.findAllElements("input");
>              Iterator<QWebElement> iter = collection.toList().iterator();
>              while (iter.hasNext()) {
>                  log.log(Level.FINEST, "iterate element");
>                  QWebElement element = iter.next();
>                  if (element.geometry().intersects(new 
> QRect(arg__1.pos().x(), arg__1.pos().y(), 1, 1))) {
>                      try {
>                          String type = element.attribute("type");
>                          if (type != null) {
>                              if (type.equals("submit")) continue;
>                          }
>                          webElement = element;
>                          log.log(Level.FINEST, "show keyboard");
>                          UIElementFactory.createKeyboard(new 
> Keyboard(this));
>                      } catch (Exception e) {
>                          e.printStackTrace();
>                          log.log(Level.SEVERE, e.getLocalizedMessage(),e);
>                      }
>                      return;
>                  }
>              }
>              log.log(Level.FINEST, "iterate element done");
>          } else {
>              log.log(Level.FINEST, "frame is null");
>          }
>          super.mouseReleaseEvent(arg__1);
>      }
> 
> 
> -
> Matthias Ebel
> _______________________________________________
> Qt-jambi-interest mailing list
> [email protected]
> http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
> 

Please create ticket for this 
http://redmine.smar.fi/projects/qtjambi/issues/new (please tell me if you need 
to register, it shouldn’t be so) and attach that hs_err log and please modify 
that example so that it is compilable(as in, so that I can reproduce the 
problem).

It looks like that actual problem is in library loading, which makes it a bit 
harder to fix without that example.
-- 
Terveisin,
Samu Voutilainen
http://smar.fi

_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to