1
/****************************************************************************
3
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
5
** This file is an example program for the Qt SQL module.
8
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
9
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11
****************************************************************************/
13
#include <qapplication.h>
14
#include <qmainwindow.h>
17
#include <qstatusbar.h>
22
int main(int argc, char *argv[])
24
QApplication app(argc, argv);
27
mainWin.setWindowTitle(QObject::tr("Qt SQL Browser"));
29
Browser browser(&mainWin);
30
mainWin.setCentralWidget(&browser);
32
QMenu *menu = mainWin.menuBar()->addMenu(QObject::tr("&File"));
33
menu->addAction(QObject::tr("Add &connection"), &browser, SLOT(addConnection()));
35
menu->addAction(QObject::tr("&Quit"), &app, SLOT(quit()));
37
QObject::connect(&browser, SIGNAL(statusMessage(QString)),
38
mainWin.statusBar(), SLOT(showMessage(QString)));