python - Using setCursorPosition in PYQT -


i have hidden qwidget, contains qlineedit

upon showing hidden qwidget, want cursor on qlineedit. implementation?

this class shown when button clicked in earlier class

    class showinfo(qtgui.qwidget):         def __init__(self, parent=none):             super(showinfo, self).__init__(parent)              showname = qtgui.qlabel("name of show:")             self.shownameedit = qtgui.qlineedit()             self.shownameedit.setcursorposition(0) #this should work              self.mainlayout = qtgui.qgridlayout()             self.mainlayout.addwidget(self.shownameedit)              self.setlayout(self.mainlayout) 

try calling self.shownameedit.setfocus()


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -