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(); }
int main( int argc, char *argv[] ) { QApplication app( argc, argv ); if ( ! createConnections() ) return 1; BookForm bookForm; app.setMainWidget( &bookForm ); bookForm.show(); return app.exec(); }