[PyQt] dip design questions?

John Fabiani johnf at jfcomputer.com
Thu Jan 23 16:31:32 GMT 2014


Hi,
I believe I'm getting a handle on using dip with sqlalchemy - thanks for 
the SQLA adapters.

Questions:
When using the declarative view is there a way not to use a spinbox for 
integers?
Does the 'Grid' work?  I'm not providing the traceback because it's 
likely I'm doing something wrong.

Error with Floats:
Even after providing a type_map in sqla_imodeltype_adapter.py I get an 
error (see below).  Would you take the time to explain what I need to do.

I added the following :

     # The map of the types used to handle each supported SQLAlchemy 
type.  Note
     # that the order might be important so we don't use a dict.
     # FIXME: Add support for more types.
     _type_map = (
         (SQLA_Boolean, Bool),
         (SQLA_Integer, Int),
         (SQLA_String,  Str),
#
         (SQLA_Float, Float),
         (SQLA_Enum, Enum),
     )

The error:

File "/home/johnf/Dip/dip/temp1.py", line 25, in <module>
class ReceiptHist(Base):
File "/home/johnf/Dip/dip/temp1.py", line 32, in ReceiptHist
recv_freight = Column(Float)
File 
"/usr/lib64/python3.3/site-packages/SQLAlchemy-0.9.1-py3.3-linux-x86_64.egg/sqlalchemy/sql/schema.py", 
line 1042, in __init__
self._init_items(*args)
File 
"/usr/lib64/python3.3/site-packages/SQLAlchemy-0.9.1-py3.3-linux-x86_64.egg/sqlalchemy/sql/schema.py", 
line 79, in _init_items
item._set_parent_with_dispatch(self)

builtins.AttributeError: type object 'Float' has no attribute 
'_set_parent_with_dispatch'



Johnf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140123/2c6c687a/attachment.html>


More information about the PyQt mailing list