[Qt-interest] Drawing rectangular

Alessandro Portale alessandro.portale at trolltech.com
Mon Sep 21 22:37:11 CEST 2009


I suggest using the HTML solution only in case you are familiar with HTML/CSS. The HTML (generated by your code and put into the QWebView) would be something semantic and without layout information like:
...
<ul>
  <li>
    Yuvaraj says:
    <dl>
      <dt>9/17/2009 11:32:27 AM</dt>
      <dd>Hello!</dd>
      <dt>9/17/2009 11:33:27 AM</dt>
      <dd>How are You?</dd>
    </dl>
  </li>
  <li>
    Alessandro says:
    <dl>
      <dt>9/17/2009 11:34:27 AM</dt>
      <dd>Hi!</dd>
      <dt>9/17/2009 11:35:27 AM</dt>
      <dd>I am fine, thanks!</dd>
    </dl>
  </li>
</ul>
...

I do not have a concrete example of how your CSS could look like, but there are plenty of great CSS tutorials inside the Interwebs. Or give an HTML sample to a good designer and he will do miracles :)

Updating the message log should be ideally be done by inserting new HTML elements in the right position. I did not yet have the time to play with QWebKit but I think that Qt 4.6 will provide easy means for doing that. See:
   http://doc.qt.nokia.com/4.6-snapshot/qwebframe.html#findAllElements
and
   http://doc.qt.nokia.com/4.6-snapshot/qwebelement.html

Alessandro

Yuvaraj R wrote:
> I referred the webview based examples
> How do i update my chat messasge contineously  ?
> 
> Thanks
> Yuvaraj R



More information about the Qt-interest-old mailing list