Hi Phil et al.,

after a longer period of absence here, I'm back, playing some PyQt 
games.. While on it, I noticed a problem with pyuic, when using 
QDataViews in designer. It resists in including the right includes:

Traceback (most recent call last):
  File "form1.py", line 224, in ?
    w = Form1()
  File "form1.py", line 26, in __init__
    self.dataView1 = QDataView(self,"dataView1")
NameError: global name 'QDataView' is not defined

Manually adding or using the Python: comment trick fixes it, but 
that's surely not intentional..

I tried fixing it with the attached patch, but failed so far :-(.
May you have an better idea, how to fix this bit..

Cheers,
Pete

Attachment: form1.ui
Description: application/designer

--- pyuic3/form.cpp.orig	2005-01-05 15:12:15.000000000 +0100
+++ pyuic3/form.cpp	2005-01-05 15:12:49.000000000 +0100
@@ -299,6 +299,9 @@
     if (globalIncludes.findIndex("qdatabrowser.h") >= 0)
         sqlClasses += "QDataBrowser";
 
+    if (globalIncludes.findIndex("qdataview.h") >= 0)
+        sqlClasses += "QDataView";
+
     if ( !sqlClasses.empty() ) {
 	out << indent << "from qtsql import";
 	char *sep = " ";
_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to