When I select Generate Dialog Code... (right click on myForm.ui file in the
Forms Tab of the IDE)I can generate Python code without a problem for a UI
that has QDockWidget class. When I go to regenerate the file I get an error
message saying that there are no classes in my myForm.py module. After
further investigation I see that the list of class types that is scanned in
the file 

C:\Python27\Lib\site-packages\eric4\Project\CreateDialogCodeDialog.py

is determined by the list on line 38. 

DialogClasses = set(["QDialog", "QWidget", "QMainWindow", "QWizard"])

If I change that line to this:

DialogClasses = set(["QDialog", "QWidget", "QMainWindow", "QWizard",
"QDockWidget"])

Then the Generate Dialog Code... command properly finds my QDockWidget type.

I'm curious why the list only contains those classes since the New Form
dialog box in Qt Designer shows several kinds:
QDockWidget
QFrame
QGroupBox
QScrollArea
QMdiArea
QTabWidget
QToolBox
QStackedWidget
QWidget
QWizard
QWizardPage
QMainWindow
QDialog

I assume each of the widgets in the list can be built inside its own UI
file: that's how I use them. I use separate UI files for each component in
the application, test them individually, then load them into the app at run
time. So generating code on a single widget is really helpful. 

Is it possible to roll the change that includes all the class types into the
next release?

Thanks!

Pat Moran

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Friday, March 15, 2013 8:00 AM
To: [email protected]
Subject: Eric Digest, Vol 81, Issue 6

Send Eric mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.riverbankcomputing.com/mailman/listinfo/eric
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific than
"Re: Contents of Eric digest..."


Today's Topics:

   1. Investigating: Eric (5) ?Edit > Comment [...]? (Pietro Moras)


----------------------------------------------------------------------

Message: 1
Date: Fri, 15 Mar 2013 10:07:26 +0000
From: Pietro Moras <[email protected]>
To: <[email protected]>
Subject: [Eric] Investigating: Eric (5) ?Edit > Comment [...]?
Message-ID: <[email protected]>
Content-Type: text/plain; charset="windows-1252"






Currently investigating
the Eric (5) feature:  ?Edit
> Comment [...]? -- In case it's a subject of
interest for you, I'd be pleased to share knowledge, questions, remarks
(e-ref.: Studio-PM <at> hotmail <dot> com).
Thanks. 
See you.

- P.M.

[Engaged with an
ambitious project of Eric (5) Test & Documentation, from time to time I dare
to inform you about what's currently going on]
                                          
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.riverbankcomputing.com/pipermail/eric/attachments/20130315/93c29
ffb/attachment-0001.html>

------------------------------

_______________________________________________
Eric mailing list
[email protected]
http://www.riverbankcomputing.com/mailman/listinfo/eric


End of Eric Digest, Vol 81, Issue 6
***********************************

_______________________________________________
Eric mailing list
[email protected]
http://www.riverbankcomputing.com/mailman/listinfo/eric

Reply via email to