Re: [PyQt] problem with QTabBar

2008-10-13 Thread Russell Valentine
Min Li wrote: Hi, everyone. I have some trouble in QTabBar. How can I trigger some event when I change the current tab to a new tab? Could you please give me some suggestion? Thanks Lee someconstructor: self.tabBar = QtGui.QTabBar() self.connect(self.tabBar, QtCore.SIGNAL("curre

[PyQt] problem with QTabBar

2008-10-13 Thread Min Li
Hi, everyone. I have some trouble in QTabBar. How can I trigger some event when I change the current tab to a new tab? Could you please give me some suggestion? Thanks Lee ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomput

[PyQt] Re: problem with QTableView.selectionChanged

2008-10-13 Thread Bastian Venthur
Thanks, that worked! I wonder why my first approach did not, since the documentation suggests it should. Anyways, thanks for the help! Cheers, Bastian Christoph Burgmer schrieb: > Hi, > > Am Monday, 13. October 2008 schrieb Bastian Venthur: > >> how can I catch a selectionChanged signal from

[PyQt] Style sheets and dynamic properties

2008-10-13 Thread Matthew Ovens
Hi, I realise there is another thread on this subject, but the problem there seemed to be different (application of the style sheet on changing the property rather than setting it initially). I'm trying to use setProperty() to set a dynamic property on a QTreeWidget which I can then use as a speci

Re: [PyQt] PyQt - How to preload values to a QTableView

2008-10-13 Thread Aaron Digulla
Quoting Anil <[EMAIL PROTECTED]>: bool QSqlRelationalTableModel::setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole )  I think you should use setData(). I haven't used setModelData() before. The usual way is like this: - Create a new row - Use setData() t

[PyQt] PyQt - How to preload values to a QTableView

2008-10-13 Thread Anil
Hi I have a QTableView that is showing some data from a MySQL database and I am trying to use it to add new values to the table. How can I preload some of the fields with available information like UserName and date rather than asking user to enter it. I tried to preset in def setModelData(se

Re: [PyQt] problem with QTableView.selectionChanged

2008-10-13 Thread Christoph Burgmer
Hi, Am Monday, 13. October 2008 schrieb Bastian Venthur: > how can I catch a selectionChanged signal from a tableView? I tried: > > QtCore.QObject.connect( self.tableView, > QtCore.SIGNAL('selectionChanged(const QItemSelection&, > const QItemSelection&)'), > s

[PyQt] problem with QTableView.selectionChanged

2008-10-13 Thread Bastian Venthur
Hi, how can I catch a selectionChanged signal from a tableView? I tried: QtCore.QObject.connect( self.tableView, QtCore.SIGNAL('selectionChanged(const QItemSelection&, const QItemSelection&)'), self.selection_changed) but selection_changed never gets called.