Results 1 to 6 of 6

Thread: qt webkit

  1. #1
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default qt webkit

    hi!
    full of luck, after i found the qt webkit, i started to program, when i noticed that i dont know WHAT to program. i searched for a docu.... nothing.

    now my queston:
    does anybody know wheres a doku for qt webkit or could give me some code that shows me how to use the webkit as qtextbrowser.

    i want use the webkit for formatting chat messages. like kopete does. they use khtml, but im programming a multiplatform chat, so i need the webkit....

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qt webkit

    I know I suggested webkit as an option, but do you really need it? Maybe it's easier to write a simple style sheet parser (or take the one present in Qt that parses its stylesheets) and use the result to manipulate the char format of the text document? I doubt you need really complex things and it should take you less than an hour to have colours, decorations, font sizes, font styles and similar up and running. Using WebKit for this is like shooting a fly with an elephant gun.

  3. #3
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qt webkit

    no i need full support of all css and html features. and i read the kopete code. they use khtml, too. aaand i dont want to add a new styling system, because the existing are good and work fine.
    i know, that it seems like shooting on a fly, but i suggest to do more than formatting in my chat. when its finished youll see wherefore i need full support

    but back to the question: do you know where i can find a doku or how i can use it like a qtextbrowser?
    i think i found out how to set a url, but i need to set html text...

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qt webkit

    I'm not suggesting any new styling system. QTextCharFormat is part of Qt (contrary to WebKit which is currently a separate branch/product). Kopete uses khtml because it's part of KDE, so it has the dependency anyway. I don't know what functionality you desire exactly, but I doubt you're after something from CSS3 or something that QTextDocument can't handle - at least I can't think of any use of those in an instant messanger application. If you really need all the html/css capabilities, then indeed you might be needing WebKit, but if it's only for formatting messages, I'd think twice before using it.

  5. #5
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt webkit

    You might consider looking at the webkitpart source in KDE for an example of how to use it.

    http://websvn.kde.org/trunk/playground/libs/webkitkde/

  6. #6
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qt webkit

    ye, the same example which is with the webkit....
    but i need to set html content not an url...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.