Results 1 to 5 of 5

Thread: Can a KHTMLPart be used without a window?

  1. #1
    Join Date
    Oct 2006
    Posts
    2
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Can a KHTMLPart be used without a window?

    Howdy All.

    I'm trying to get at some form data on HTML pages in
    a dedicated data collection environment where there
    is no display.

    It would be very convenient to use the KDE DOM
    methods as well. It seems like a natural choice.

    However, even very simple programs like this

    Qt Code:
    1. int
    2. main(int argc, char *argv[])
    3. {
    4. QApplication *qa = new QApplication(argc, argv, false); // attempt non-gui operation
    5. KHTMLPart *html = new KHTMLPart();
    6. }
    To copy to clipboard, switch view to plain text mode 

    error out with:

    Qt Code:
    1. QPixmap: Cannot create a QPixmap when no GUI is being used
    To copy to clipboard, switch view to plain text mode 

    Can I really not access the DOM and HTML parsing routines without a window?

    If so, does anybody have a sense for how hard that might be to "fix"??

    Finally, alternate suggestions are quite welcome!

    Thanks!
    Andy

  2. #2
    Join Date
    Feb 2006
    Location
    Boulder, Colorado, USA
    Posts
    63
    Thanked 8 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can a KHTMLPart be used without a window?

    I don't know about KHTML, so I can't help you there, but if you can use Qt 4, there are some great dom support classes.

    Qt 4 DOM classes

    Just as a guess though, i think QPixmap uses native calls on the platforms Qt supports, I think it uses xlib stuff on linux and gdi stuff on windows. If so, then you need to able to use those libraries

  3. #3
    Join Date
    Feb 2006
    Location
    Boulder, Colorado, USA
    Posts
    63
    Thanked 8 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can a KHTMLPart be used without a window?

    Actually Qt 3 has similar classes too

    http://doc.trolltech.com/3.3/xml.html#3

  4. #4
    Join Date
    Oct 2006
    Posts
    2
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Can a KHTMLPart be used without a window?

    Hey, thanks for chiming in!

    Let me rephrase my question: I know QT and KDE have some great
    DOM methods, that's why I'm here.

    I'm trying to use them in a standalone environment where I have
    no display. Therefore no X windows, and therefore, it appears,
    not much access to QT and KDE other than the string functions...

    Any pointers?
    Thanks!
    Andy

  5. #5
    Join Date
    Jan 2006
    Posts
    368
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can a KHTMLPart be used without a window?

    In Qt4 you can build console only projects. This is not possible with KDE3 as it's based on Qt3. KDE4 is not stable yet, I would not touch it.

Similar Threads

  1. Replies: 3
    Last Post: 23rd July 2006, 19:02
  2. animate a window
    By iGoo in forum Qt Programming
    Replies: 4
    Last Post: 27th June 2006, 11:46
  3. Move window in Clone Mode
    By ultrabrite in forum Qt Programming
    Replies: 1
    Last Post: 14th June 2006, 19:22
  4. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 11:21
  5. Main window
    By Michiel in forum Qt Tools
    Replies: 1
    Last Post: 21st March 2006, 00:54

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.