Bug 211590

Summary: pykdeuic4 generates the wrong python code for KEditListBox
Product: [Developer tools] bindings Reporter: Luca Beltrame <lbeltrame>
Component: generalAssignee: kde-bindings
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Unspecified   
Latest Commit: Version Fixed In:
Attachments: Example UI file that triggers this behavior once compiled

Description Luca Beltrame 2009-10-23 22:17:12 UTC
Version:            (using KDE 4.3.2)
Installed from:    SuSE RPMs

When using pykdeuic4 to process .ui files to Python files, there are problems regarding the parsing of KEditListBox.
Specifically:

1. Create an empty widget in Qt Designer
2. Insert a KEditListBox in it
3. Set buttons to only Add and Remove
4. Save the .ui file

This yields, in the generated Python code, something like this:

self.keditlistbox.setButtons(QtGui.KEditListBox.Add | QtGui.KEditListBox.Remove)

This is actually wrong (first of all because they're not members of QtGui). The proper syntax would be:

self.keditlistbox.setButtons(KEdlitListBox.Button(KEditListBox.Add | KEditListBox.Remove)

Notice: I'm not sure if this is a pykdeuic4 bug or a Designer bug. I'm attaching the ui file to this report just in case.
Comment 1 Luca Beltrame 2009-10-23 22:18:17 UTC
Created attachment 37774 [details]
Example UI file that triggers this behavior once compiled
Comment 2 Luca Beltrame 2012-11-18 13:38:51 UTC
Tested with 4.10 git master, works. Closing as FIXED.