Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 24th, 2012  |  syntax: None  |  size: 0.60 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to show a form in PyQGIS?
  2. QDialog.__init__(self, parent)
  3. TypeError: QDialog(QWidget parent=None, Qt.WindowFlags flags=0): argument 1 has unexpected
  4. type 'QgisInterface'
  5.        
  6. class DlgQueryBuilder(QDialog, Ui_Dialog):
  7.     def __init__(self,db=conn, iface=None, parent=None):
  8.  
  9.  
  10.             QDialog.__init__(self, parent)
  11.  
  12.             self.setupUi(self)
  13.  
  14.             self.db = db
  15.        
  16. def queryWindow(self):
  17.             """ show sql window """
  18.             dlg = DlgQueryBuilder(self, self.db, self.iface)
  19.             if dlg.exec_():
  20.                     self.close()
  21.        
  22. dlg = DlgQueryBuilder(self.db, self.iface)