[PyQt] Is it possible to subclass QSqlDatabase?

2009-02-05 Thread Mattia Borsalino
Hi, I'm trying to subclass QSqlDatabase, which appears to not be allowed. The following code crashes at the first line of the main code (addDatabase). What am I missing? Thanks in advance, Mattia #!/usr/bin/python # -*- coding: latin-1 -*- import sys from PyQt4.QtCore import * from PyQt4.QtGui

Re: [PyQt] Fosdem 2009

2009-02-05 Thread Simon Edwards
Hello, Erik Janssens wrote: For those of you who attend FOSDEM this year, you might be interested in the short tutorial I will present on building GUI applications with PyQt and Elixir/Sqlalchemy. Cool. I'll be at FOSDEM with the KDE crowd. Come over and say hello. That welcome applies to any

Re: [PyQt] PyKDE segfaults when calling group() on KSharedConfig object

2009-02-05 Thread Simon Edwards
Hello, Benno Dielmann wrote: config = KSharedConfig.openConfig() group = config.group('General') The second line results in a segfault. Interestingly, it doesn't if the config object is returned by KGlobal.config(). Documentation tells us KGlobal.config() returns a KSharedConfig object as doe

Re: [PyQt] rcc module?

2009-02-05 Thread Mads Ipsen
- Original Besked Fra: Phil Thompson Til: Brent Villalobos Cc: pyqt@riverbankcomputing.com Emne: Re: [PyQt] rcc module? Dato: 05/02/09 21:43 > On Thu, 05 Feb 2009 11:59:20 -0800, Brent Villalobos > wrote: > > Is there an rcc python module si

Re: [PyQt] rcc module?

2009-02-05 Thread Phil Thompson
On Thu, 05 Feb 2009 11:59:20 -0800, Brent Villalobos wrote: > Is there an rcc python module similar to the uic module? I would like > to be able to create a resource module dynamically at run time in a > similar manner I create the UI classes using the uic module. Right now > I think I have t

[PyQt] Fosdem 2009

2009-02-05 Thread Erik Janssens
Dear all, For those of you who attend FOSDEM this year, you might be interested in the short tutorial I will present on building GUI applications with PyQt and Elixir/Sqlalchemy. more information can be found at : http://www.fosdem.org/2009/schedule/events/camelot Regards, Erik _

[PyQt] rcc module?

2009-02-05 Thread Brent Villalobos
Is there an rcc python module similar to the uic module? I would like to be able to create a resource module dynamically at run time in a similar manner I create the UI classes using the uic module. Right now I think I have to shell out and run pyrcc4 so I'm wondering if there is a better way

Re: [PyQt] set qlineedit red, easy??

2009-02-05 Thread Phil Thompson
On Thu, 05 Feb 2009 08:25:30 -0500, Matt Smith wrote: > You've told me this before, but I didn't quite follow what was buggy. > > pal = QtGui.QPalette(MyLineEdit.palette()) > pal.setColor(QtGui.QPalette.Base,QtGui.QColor('red')) > MyLineEdit.setPalette(pal) > > It seems that .palette() is return

Re: [PyQt] set qlineedit red, easy??

2009-02-05 Thread Matt Smith
You've told me this before, but I didn't quite follow what was buggy. pal = QtGui.QPalette(MyLineEdit.palette()) pal.setColor(QtGui.QPalette.Base,QtGui.QColor('red')) MyLineEdit.setPalette(pal) It seems that .palette() is returning a const and I shouldn't modify it. What about .parent()? should

Re: [PyQt] set qlineedit red, easy??

2009-02-05 Thread Phil Thompson
On Thu, 05 Feb 2009 07:50:57 -0500, Matt Smith wrote: > You could use the palette. > > > MyLineEdit.palette().setColor(QtGui.QPalette.Base,QtGui.QColor('red')) That's buggy as palette() returns a const. You need to make a copy of the returned palette and modify that. See the roadmap. Phil

Re: [PyQt] set qlineedit red, easy??

2009-02-05 Thread Matt Smith
You could use the palette. MyLineEdit.palette().setColor(QtGui.QPalette.Base,QtGui.QColor('red')) mbs On Thu, 2009-02-05 at 12:00 +, pyqt-requ...@riverbankcomputing.com > Le 5/2/2009, "Knapp" a crit: > > >I have a qlineedit that I want to turn the background red when the > >input is bad

Re: [PyQt] set qlineedit red, easy?? SOLVED

2009-02-05 Thread Mads Ipsen
- Original Besked Fra: Knapp Til: Frédéric Cc: pyqt@riverbankcomputing.com Emne: Re: [PyQt] set qlineedit red, easy?? SOLVED Dato: 05/02/09 13:11 > On Thu, Feb 5, 2009 at 12:50 PM, Frédéric > wrote: > > > > Le 5/2/2009, "Knapp"

Re: [PyQt] set qlineedit red, easy?? SOLVED

2009-02-05 Thread Knapp
On Thu, Feb 5, 2009 at 12:50 PM, Frédéric wrote: > > Le 5/2/2009, "Knapp" a écrit: > >>I have a qlineedit that I want to turn the background red when the >>input is bad but I can't seem to find how to do this. I would think it >>would be easy but it does not seem to be. unless I missed something.

Re: [PyQt] set qlineedit red, easy??

2009-02-05 Thread Frédéric
Le 5/2/2009, "Knapp" a écrit: >I have a qlineedit that I want to turn the background red when the >input is bad but I can't seem to find how to do this. I would think it >would be easy but it does not seem to be. unless I missed something. Using a stylesheet? css = """QLineEdit { backgrou

Re: [PyQt] item delegates

2009-02-05 Thread Mads Ipsen
- Original Besked Fra: Baba-k Til: pyqt@riverbankcomputing.com Emne: Re: [PyQt] item delegates Dato: 05/02/09 11:09 > > Hi Mads, > > I dunno if this is the best way of doing it but could you test to see which > row/column the item is inside the delegate and if its not in the c

[PyQt] set qlineedit red, easy??

2009-02-05 Thread Knapp
I have a qlineedit that I want to turn the background red when the input is bad but I can't seem to find how to do this. I would think it would be easy but it does not seem to be. unless I missed something. Thanks. -- Douglas E Knapp Amazon Gift Cards; let them choose!! http://www.amazon.com/gp/

[PyQt] Deselecting items in qtreeview

2009-02-05 Thread Baba-k
Hi Everyone, I was wondering if anyone know what the correct/best way to deselect items inside of a qtreeview is ? At the moment im trying to do something like this but it doesn't seem to be doing anything selectionModel = self.selectionModel() selectionModel.select(itemToDeselect, QtGui.QIt

Re: [PyQt] python designer plugins cause strange bugs to buttonBoxes

2009-02-05 Thread Phil Thompson
On Thu, 5 Feb 2009 12:57:10 +0300, Lev Shamardin wrote: > Hi all, > > Just discovered a very odd thing: loading Qt4 designer with any plugin > written in python breaks buttonBox control in an odd way, it sets > standardButtons property to the "NoButton" value, and it is impossible > to change thi

Re: [PyQt] item delegates

2009-02-05 Thread Baba-k
Hi Mads, I dunno if this is the best way of doing it but could you test to see which row/column the item is inside the delegate and if its not in the correct one then call the parent class method for creating the editor widget otherwise use yours, for example.. class myDelegate(QtGui.QItemDelega

[PyQt] python designer plugins cause strange bugs to buttonBoxes

2009-02-05 Thread Lev Shamardin
Hi all, Just discovered a very odd thing: loading Qt4 designer with any plugin written in python breaks buttonBox control in an odd way, it sets standardButtons property to the "NoButton" value, and it is impossible to change this value to anything reasonable. This was tested on Fedora 10 box wit