Some odd QLineEdit behavior... I want a QLineEdit to display the file path to an SQLite3 database.

txtdb is a QLineEdit

This changes the text perfectly:
Qt Code:
  1. txtdb.setText("foo")
To copy to clipboard, switch view to plain text mode 


This prints the filename as a string as expected:
Qt Code:
  1. def getdb():
  2. return QtGui.QFileDialog.getOpenFileName(None, "Select your database file", "", "SQLite 3 Databases (*.sq3)")
  3.  
  4. print getdb()
To copy to clipboard, switch view to plain text mode 


Put them together...
Qt Code:
  1. txtdb.setText(getdb())
To copy to clipboard, switch view to plain text mode 
..and the text just does not change! Even
Qt Code:
  1. a=getdb()
  2. txtdb.setText(a)
To copy to clipboard, switch view to plain text mode 
is a total fail!

Anyone got any ideas how to fix this?

Rich