summaryrefslogtreecommitdiffstats
path: root/kjsembed/docs/examples/livedata/livepartdata.js
blob: 345e84e9415fdf7d3e3dcbbdd9300c527f9fb710 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env kjscmd

// Create the UI
var mw = new KParts_MainWindow();
var ac = mw.actionCollection();

var split = new QSplitter( mw );
mw.setCentralWidget( split );

var view = Factory.createROPart( "text/html", split, "html" );

view.openStream( 'text/html', 'file:///index.html' );
view.writeStream( '<html><body><h1>Inserting Data Directly</h1>This shows how ' );
view.writeStream( 'you can send data to a part directly from a script. </body></html>' );
view.closeStream();

//
// Activate XMLGUI and show the window
//
StdAction.quit( mw, 'close()', mw.actionCollection() );

mw.resize( 700, 500 );

mw.show();
application.exec();