def main(): """ Enters an event-loop. """ app = QApplication(sys.argv) browser = ImageBrowser() browser.show() sys.exit(app.exec_())
def load_formula(self,file): try: self.compiler.load_formula_file(file) type = browser.guess_type(file) browser.set_type(type) browser.update(file) browser.show(self.window, self.f, type) return True except Exception, err: self.show_error_message(_("Error opening %s") % file, err) return False
def browser(self,*args): """Display formula browser.""" browser.show(self.window,self.f)