示例#1
0
void LibraryForm::addBook()
{
    BookForm *bookForm = new BookForm;
    connect(bookForm, SIGNAL(bookAdded(rti_book*)), libraryModel, SLOT(addBook(rti_book*)));
    connect(bookForm, SIGNAL(bookAdded(rti_book*)), this, SLOT(setModified()));
    bookForm->show();
}
示例#2
0
int main( int argc, char *argv[] ) 
{
    QApplication app( argc, argv );

    if ( ! createConnections() ) 
	return 1;

    BookForm bookForm;
    app.setMainWidget( &bookForm );
    bookForm.show();

    return app.exec();
}