January 13, 2011

kholis kholis
Lab Rat
2 posts

How to display specific part from website?

 

How to display only “web search” part from yahoo website (for instance)? marked as red square in following picture !http://picasaweb.google.com/nur.kholis.majid/Misc#5561555468659016274()!

thanks.

12 replies

January 13, 2011

mario mario
Lab Rat
240 posts

A simple “naive” solution is to iterate the page’s QWebElements and set the “display” style to “none” on all element but the search box

January 13, 2011

Andre Andre
Robot Herder
6295 posts

Couldn’t you insert a style sheet for that instead?

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

January 13, 2011

mario mario
Lab Rat
240 posts

Sure, that should be possible I think.

January 13, 2011

Mohsen Mohsen
Lab Rat
748 posts

i think you should analyze the Html code inside using DOM and then take the piece you need to view. it’s not so simple.

http://doc.qt.nokia.com/latest/qdomdocument.html

 Signature 

www.madagon.com

January 13, 2011

Benjamin Poulain Benjamin Poulain
Lab Rat
153 posts

You could probably create a widget wrapper over QWebPage that show only the geometry of the element.

For such a simple page, the idea of mario is way simpler and could work.

January 13, 2011

Volker Volker
Ant Farmer
5428 posts

What about just loading http://search.yahoo.com/?

January 13, 2011

mario mario
Lab Rat
240 posts
Volker wrote:
What about just loading http://search.yahoo.com/?

That would be to easy Volker :)

January 14, 2011

Mohsen Mohsen
Lab Rat
748 posts

mario solution is interesting

 Signature 

www.madagon.com

January 14, 2011

mario mario
Lab Rat
240 posts

Actually, I’ve done an app with filtering capabilities by settting the display style to none and it works great.

The app shows a web page containing a table with sport matches. I added filtering buttons to support filtering the table. I also remove some links from the page by settings the display style.

January 14, 2011

Mohsen Mohsen
Lab Rat
748 posts

nice job dude! :)

 Signature 

www.madagon.com

January 16, 2011

kholis kholis
Lab Rat
2 posts

Volker wrote:
What about just loading http://search.yahoo.com/?

@Volker: yahoo.com is just an example. I will use it to other website of course :) thanks anyway

@all: thanks all for the clues. I’ll try what mario & mohsen suggested.

January 23, 2011

rich rich
Lab Rat
37 posts

I posted some examples of a few ways of doing this kind of webslicing a while back in my blog: http://www.kdedevelopers.org/node/4086

 
  ‹‹ How to find QWebFrame calling C++ API from Javascript      Disable automatic Encode URL ››

You must log in to post a reply. Not a member yet? Register here!