python gui sample: properly fix the double connect issue
This commit is contained in:
parent
28d580adb8
commit
8504d70e08
@ -14,7 +14,7 @@ import rclmain
|
|||||||
from getopt import getopt
|
from getopt import getopt
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
from PyQt4.QtCore import pyqtSlot
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# Highlighting methods. Just for showing the groups usage, we add the
|
# Highlighting methods. Just for showing the groups usage, we add the
|
||||||
@ -187,11 +187,9 @@ class RclGui_Main(QtGui.QMainWindow):
|
|||||||
else:
|
else:
|
||||||
self.ui.savePB.setEnabled(False)
|
self.ui.savePB.setEnabled(False)
|
||||||
|
|
||||||
# The 'checked' thing is to work around a bug in pyqt?
|
@pyqtSlot()
|
||||||
def on_previewPB_clicked(self, checked=True):
|
def on_previewPB_clicked(self):
|
||||||
print "on_previewPB_clicked(self, %s):" % (repr(checked))
|
print "on_previewPB_clicked(self)"
|
||||||
if checked:
|
|
||||||
return
|
|
||||||
newdoc = textextract(self.currentdoc)
|
newdoc = textextract(self.currentdoc)
|
||||||
query = self.qmodel.query;
|
query = self.qmodel.query;
|
||||||
groups = query.getgroups()
|
groups = query.getgroups()
|
||||||
@ -209,11 +207,9 @@ class RclGui_Main(QtGui.QMainWindow):
|
|||||||
text += '</body></qt>'
|
text += '</body></qt>'
|
||||||
self.ui.resDetail.setText(text)
|
self.ui.resDetail.setText(text)
|
||||||
|
|
||||||
# The 'checked' thing is to work around a bug in pyqt?
|
@pyqtSlot()
|
||||||
def on_savePB_clicked(self, checked=True):
|
def on_savePB_clicked(self):
|
||||||
print "on_savePB_clicked(self, %s):" % (repr(checked))
|
print "on_savePB_clicked(self)"
|
||||||
if checked:
|
|
||||||
return
|
|
||||||
doc = self.currentdoc
|
doc = self.currentdoc
|
||||||
ipath = doc.ipath
|
ipath = doc.ipath
|
||||||
if not ipath:
|
if not ipath:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user