[PyKDE] kdepyuic modifications
Mikhail Yarmish
mike.spacer at gmail.com
Sun Feb 12 06:53:46 GMT 2006
Danny Pansters wrote:
>On Saturday 11 February 2006 13:15, Mikhail Yarmish wrote:
>
>
>>At the moment kdepyuic doesn't make import of kde widgets. I've modified
>>it for myself to do that imports. At the moment it do import just for
>>kfile widgets but if somebody needs such upgrade I'll finish it for
>>fully support of all modules. So what do you think guys?
>>
>>
>
>I haven't had any need for this (only really used kdecore and kdeui), but the
>idea seems good.
>
>I'd suggest instead of using kfile = [ long, list, that, may, often, change ]
>to get as many of them automatically and suited for the version/environment
>that kdepyuic is actually being run on, for example:
>
>import kfile
>mods = []
>for item in dir(kfile):
> if not item.startswith("__"):
> mods.append(item)
> if item == "KNotify":
> for thing in dir(kfile.KNotify):
> if not thing.startswith("__"):
> mods.append(item + "." + thing)
>mods.sort()
>
>
Thx! That seems much more nice. I didn't know that such way is possible
because I'm quite new to all this =)
>If you'd put this into a larger loop that iterates over all modules you're on
>your way to a general script that's more maintenance-friendly.
>
>Small nitpick: I don't know about about the others but I find it easier to
>read a (unified) diff instead of the whole edited script, to see what the
>changes are ('diff -u oldfile newfile > mydiff').
>
>Dan
>
>
Do you mean that process of your coding is like:
- create an ui in designer;
- make py file from it and put some changes there;
- make diff between clean and with changes py files;
- make some changes in ui file;
- create new py file and patch it with your diffs.
...
Have I understood right? That works without problems?
More information about the PyQt
mailing list