You are not logged in.

  • "David Boosalis" started this thread

Posts: 10

Location: Fresno California, USA

  • Send private message

1

Monday, September 13th 2004, 4:55pm

KHTML Plugin will not reize

Does anyone know how to get the KHTML plugin to resize correctly if it is to be inherrited by KMainWindow::plugin.

When the window comes up and I set it to 400x400 pixels only the outer window gets resized and not the KHTML window. I've tried using a gridlayou, but nada.

If I make the KHTML widget a toplevel widget then it works fine.

Here is the simple code I am working with:

BrowserDialog::BrowserDialog( QWidget* p, const char* n, bool m, WFlags fl ):
KParts::MainWindow(p,n,fl),m_part( 0L )

{
// QGridLayout *grid= new QGridLayout(this,1,1,0,0);
KHTMLPart *browser=new KHTMLPart(this);
// setCentralWidget(browser);
// grid->addWidget((QWidget *) browser,0,0);
browser->openURL("http://www.sun.com");


createGUI( 0L ); // not sure what this does, but it wasin IBM tutorial
resize(400,400 );

}



Thank you for any help
QT Developer

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Monday, September 13th 2004, 6:53pm

Try to add the part's view to the layout or set it as the central widget.

The KHTMLPart is the document partner, the KHTMLView which you can get through KHTMLPart::view() is the widget

Cheers,
_
Qt/KDE Developer
Debian User

Boosalis

Unregistered

3

Monday, September 13th 2004, 10:35pm

view() worked

Thank you for helping me with my problem it worked

-david