Run the query/queries entered in the QTextEdit widget.
(self)
| 113 | toolbar.addAction(run_query_act) |
| 114 | |
| 115 | def runQuery(self): |
| 116 | """Run the query/queries entered in the QTextEdit widget.""" |
| 117 | query_text = self.query_entry_field.toPlainText() |
| 118 | queries = query_text.split('\n') |
| 119 | |
| 120 | if query_text != "": |
| 121 | for qry in queries: |
| 122 | if qry == "": |
| 123 | # Pass over empty lines |
| 124 | pass |
| 125 | else: |
| 126 | query = QSqlQuery(qry) |
| 127 | self.sql_model.setQuery(query) |
| 128 | |
| 129 | def clearText(self): |
| 130 | """Clear the QTextEdit widget's text.""" |
nothing calls this directly
no outgoing calls
no test coverage detected