QT/WebKit GUI pass selected HTML element data to Qt app - qt

I'm going to collecect form inputs on web pages to fill them next time automatically based on input field name.
How to pass selected/howered HTML element data in QtWebkit to qt application?
Like Firebug does.
Qt version: 4.6 / 4.7
Thanks.

Add some JavaScript to assign a unique ID or class to the element below the mouse pointer and then use the standard selectors with the QWebFrame to locate it.
A more simple solution might be the selector ":hover" but that will give you a whole bunch of elements which you need to filter because the mouse always hovers over HTML and BODY and all the other elements which are stacked upon each other below your mouse. So if the mouse is over a span in a paragraph, you will get at least HTML, BODY, P, SPAN.

Related

How do I make selectable A tag?

Is there any way to make the text within an <a> tag selectable, using CSS?
I can't seem to be able to search this query for useful results on the web, "a" just finds the word "a" :)
I don't control the original creation of the document.
Are you trying to do this in a XUL document?
If so, you're probably looking for the following CSS property:
-moz-user-select: text;
I've used that on "description" elements with success but never tried on an "a" element.
You're either literally trying to just select text inside of an anchor element as a user.
OR
You're trying to use JavaScript to select text inside an anchor for the purposes of utilizing that text.
If it's the first simply select the text just at the edge outside of the anchor, if the selected character is 49% of less closer to the anchor then the browser won't select that character.
If you're trying to use JavaScript to get the text of an anchor you'll want to look at my tutorial, try selecting text and then clicking on the anchor below. That should give you some much needed direction...
http://www.jabcreations.com/blog/javascript-parentnode-of-selected-text
If none of that helps it would greatly benefit yourself as well everyone else reading your question to communicate your goal with greater clarity.
The nature of <a> is a link on HTML.So when mouse clicked on the text inside <a> the trigger of the link automatically triggered. I think it could not archive just by CSS alone. JavaScript need here
Run JavaScript Code
may let you select the text and handle click (if necessary )

Is it possible to see all changes that occur because you change a css class in Chrome?

I am trying to fix a presentation bug in Google Chrome. When I change one class, the page looks correct. However, if I change every attribute of class A to those of class B, the presentation is still wrong. Therefore, one of the child elements has a different style applied when I change the style.
Is there a way to quickly see all the changes in the computed styles on all elements that occur because you change a class on one element?
With an element selected, click on the '+' in the upper right corner of the inspector. This will allow you to write a new rule.

On mouse over surround element with additional elements without moving it

i need some pointers here because i don't really know what to look for.
The project is in gwt and is using gwtquery.
I have this page with some elements and when the mouse overs an element it changes showing additional infos, let's call it header. When the mouse goes out of the header (which has some buttons so it need to stay visible once shown) it returns invisible.
The problem is that when the header is made visible all the elements of the page change position because my element changes in dimension. What i wish to do is to keep the element in the same position and overlap the header over everything with z-index.
It's not about GWT at first hand. It's mostly about general concepts of elements positioning and layout building for html pages. You should start from something like http://www.w3schools.com/Css/css_positioning.asp
And then find the appropriate tools in GWT framework or in third party libraries that are available.

Dojo GFX widgets displaying float-like behaviour instead of correct positioning

I'm using Dojo GFX to do some simple drawing, but having a problem with IE 7/8 (switching browsers is not an option).
If I create a div, set up a surface and draw some rects, they draw correctly relative to the div, so far so good.
However, what I want to do is create a widget, something with an embedded 'surface' that draws based on some widget-specific data. As such, I have a widget that contains a div, and I draw into this div. When I do that, the rects I create behave as if they are responding to a float:right, appearing in order they are created and ignoring the 'x' parameter.
I assume that this behaviour is something to do with CSS, but I haven't got to the bottom of it yet. Any ideas or solutions gratefully appreciated!
Updates:
I've disabled all stylesheets and I am not using style attributes. No difference to the behaviour.
I've inspected the markup that gets generated using IE8 dev tools. Apart from the different location of the containing div, the only difference I can see is that the v:roundrect elements have no child elements when created against the widget div, but they do have empty elements like stroke when created against the div referenced by ID.
Reading back through the docs, a difference I can see that might be responsible is that the postCreate method where I am doing my drawing is manipulating a div that has not been added to the dom yet, whereas drawing on a hardcoded div is done when it does exist. Maybe the difference in rendering is something to do with this? Is there a specific lifecycle function which is appropriate to draw in for widgets?
It seems that if you are going to use Dojo GFX and draw on DOM elements that are created as part of a widget in IE7/8, you must actually do the drawing in an override of the startup() method.
Drawing in the postCreate() method causes incorrect rendering resembling a float: left.

How can I enclose form fields in an element of my choice in symfony 1.4

I want to include every form element (along with it's label) enclosed in a div element. i.e. every form element printed along with it's label should appear in a div element.
How can I do this?
Thanks
Nice description of how to customize form element rendering can be found in Advanced Forms chapter of The More with symfony book.
Regards.

Resources