Example #1
0
 def load_table_data(self):
     if self.input_crawl_pages.text() != "":
         self.index = -1
         while self.download_table.rowCount() > 0:
             self.download_table.removeRow(0)
         global TARGET_CRAWL_PAGE
         TARGET_CRAWL_PAGE = int(self.input_crawl_pages.text())
         dlg = Dialog.ProgressBar(LoadDownloadData())
         dlg.exec_()
         for item in download_list:
             self.index = self.index + 1
             self.download_table.insertRow(self.index)
             self.download_table.setItem(self.index, 0,
                                         QTableWidgetItem(item.code))
             self.download_table.setItem(self.index, 1,
                                         QTableWidgetItem(item.title))
             self.download_table.setItem(self.index, 2,
                                         QTableWidgetItem("Ready.."))
Example #2
0
def open_loading_dialog(thread):
    dlg = Dialog.ProgressBar(thread)
    dlg.show()
    dlg.exec_()