#include "main.h" #include #include #include #include #include #include #include Window::Window() { this->resize(800,600); KService::Ptr service = KService::serviceByDesktopName("konsolepart"); Q_ASSERT(service); KParts::ReadOnlyPart* part = service->createInstance(this, this, QVariantList()); Q_ASSERT(part); setCentralWidget( part->widget() ); TerminalInterface* interface = qobject_cast(part); interface->showShellInDir(QDir::home().path()); connect(part, SIGNAL(destroyed()), this, SLOT(deleteLater())); } int main( int argc, char** argv ) { KAboutData* about = new KAboutData( "tetest", 0, ki18n("TETest"), "0.1" ); KCmdLineArgs::init( argc, argv, about ); KApplication app; Window* window = new Window(); window->show(); return app.exec(); }; #include "moc_main.cpp"