=begin /**************************************************************************** ** $Id: qt/examples/helpviewer/main.cpp 2.2.2 edited 2000-08-31 $ ** ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. ** ** This file is part of an example program for Qt. This example ** program may be used, distributed and modified without limitation. ** *****************************************************************************/ =end #include "helpwindow.h" #include #include #include #include require "qt2" include Qt2 require "htmlwindow_lib.rb" QApplication::setColorSpec( QApplication::ManyColor ) a = QApplication.new([$0]+ARGV) if (ARGV.size > 1) home = ARGV[1] else home = `echo $QTDIR`.chop! + "/doc/html/index.html" end help = HelpWindow.new(nil, "help viewer") help.setHomePath(home,".") if ( QApplication::desktop().width() > 400 && QApplication::desktop().height() > 500 ) help.show() else help.showMaximized() end Qt2::connect( a, QSIGNAL("lastWindowClosed()"), a, QSLOT("quit()") ) a.exec()