📄 todo
字号:
1. Make the parser aware of Python keywords so they can't be used asmember function names.5. Allow handwritten code for static class variables (likeKTMainWindow.memberList). The problem is intercepting references to it(__getattr__ and __setattr__ aren't good enough) - probably extending thelazy function mechanism.11. Consider changing the way default arguments that are function calls arehandled. At the moment the function is always called and the result discardedif it is not needed. It should really only be called if the result is reallyneeded.13. Maybe expose a type's release function in the sip module.18. Implement the C++ feature of automatically calling simple ctors totransparently convert between types for function parameters. For example, afunction takes a parameter of type QKeySequence, but is passed an int, butthere is a QKeySequence ctor that takes a single int - so call itautomatically. This just needs extra code generated for the CanConvertTo andConvertTo functions. This will only work where the destination type is aclass. Note that we will end up doing lots of checks in the CanConvertTofunction and repeating them in the ConvertToFunction. It would be better ifthe CanConvertTo function could return some information (even the results ofthe conversion of simple types like ints) to be re-used by ConvertTo - but makesure default arguments are handled correctly. We could implement it for basetypes as well (if the source type implemented an appropriate cast operator) butthe way of doing argument parsing would have to change completely - ifsipParseArgs was trying to convert an argument to an int it would have to havea table of all types that could be converted to an int (messy and slow?).19. Consider changing sipConvertToCpp() etc. to take a PyObject* (ratherthan a sipWrapperType*) and do a check and cast internally.22. Consider adding support for methods that take keyword arguments. Do itby allowing a function parameter to have a name (this becomes the keyword) andextend sipParseArgs() to take an options dictionary and list of keywords.24. Need some way of implementing new Qt properties, or at least fiddle theimplementation of QSqlPropertyMap to allow new customer editor widgets to beimplemented in Python.25. Add support for specifying docstrings for generated methods.26. Fully implement QObject.disconnect().27. Look at adding QObject.Q_OBJECT() that will create the moc generatedmethods dynamically (maybe just the tr() functions).28. Consider creating a copy of a const reference when wrapping it in orderto enforce const in Python. Or add a flag to the wrapper which says it is aconst instance. I think the only to way to implement it is to have a "const"Python type - an instance of which will point to the underlying Python object.This will enable const_cast to be implemented.30. Add support for specifying the reverse arithmetic operators. (Or justdocument that you should use the normal ones as global operators?)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -