On 12/21/2010 01:47 PM, ext achellies wrote:
  HI, i have a problem, i want to use the webkit rendering a html file,
  the html file only contains text, and when i use the
  webkitlauncher.exe load the html file,

  i see the document Width and Document Height are 2236, 2874, so i have
  to use scrollbar to view the whole text,

  i just want only use the vertical Scrollbar, and do not want use the
  horizontal Scrollbar,

  so i just call FrameView::setContentsSize(800, 600) , but the layout
  do not changed, and then i call ScrollView::setUseFixedLayout(true) ,
  scrollView::setFixedLayoutSize(800, 600), but the layout is not
  changed too, so i am very puzzled how to make the webkit rendering the
  html with a given width.

You don't have to use internals APIs, you can just use QWebPage::setPreferredContentsSize().

Note that this will not prevent the horizontal scrollbar in all cases. If you have a word composed of unsecable characters, there are cases where the layout will never cut the line.

cheers,
Benjamin
_______________________________________________
webkit-qt mailing list
webkit-qt@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt

Reply via email to