User Tools

Site Tools


qt:pyqt_ide_options

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
qt:pyqt_ide_options [2011/04/20 17:06] – [General IDE support] mithatqt:pyqt_ide_options [2011/04/20 20:44] (current) mithat
Line 135: Line 135:
 === Eclipse+Pydev === === Eclipse+Pydev ===
  
-It's freaking heavy and bit obtuse. Setting up is a multi-step process. Once set up, to get code completion to work, you need to add PyQt lib path to project. (This is true of a lot of the IDEs.) Even then, the code completion doesn't seem to always pick up variables declared in the file itself--unless it's just slow or requires a Ctrl+Space to make go. This needs testing. But once it gets going, it seems to be really nice.+It's freaking heavy and bit obtuse. Setting up is a multi-step process. Once set up, to get code completion to work, you need to add the PyQt lib path (''/usr/lib/pymodules/python2.6/PyQt4''to project's PYTHONPATH. (You need to specify extra info for PyQt to a lot of IDEs, but this is one of the cases where the info needs to be provided on a *per project* basis.) Even then, the code completion doesn't seem to always pick up variables declared in the file itself--unless it's just slow or requires a Ctrl+Space to make go. This needs testing. But once it gets going, it seems to be really nice.
  
   * Enable/disable bracket completion?   * Enable/disable bracket completion?
Line 149: Line 149:
  
 == Conclusion == == Conclusion ==
-Yes. Autocompletion needs more testing. Biggest con: it's a resource hog and then some.+Yes. Autocompletion needs more testing. Biggest con: it's a resource hog. Setting up is a bit of a PITA. Setting the per-project PyQt4 stuff is definitely a PITA.
  
 === Editra == === Editra ==
 Designed as a text editor, with plugins makes a decent IDE. It's in alpha now but usable. Designed as a text editor, with plugins makes a decent IDE. It's in alpha now but usable.
  
-    * Autocomplete seems promising!+    * Autocomplete seems promising
       * No config was required out of the box (IIRC)       * No config was required out of the box (IIRC)
-      * Nice icons with code completion -- definitely adds to usabilitypossibly more than Spyder's object browser.+      * Nice icons with code completion -- definitely adds to usability (possibly as much or more than Spyder's object browser).
       * Does not seem to AC from the source file. Definitely doesn't read up the definition stack to get completions.       * Does not seem to AC from the source file. Definitely doesn't read up the definition stack to get completions.
       * Hover over stuff brings up calltip info (if it can figure it out)       * Hover over stuff brings up calltip info (if it can figure it out)
Line 162: Line 162:
     * Debug can be set up with external call to winpd or something else (in Launch bar)     * Debug can be set up with external call to winpd or something else (in Launch bar)
     * Needs a **refactoring** tool     * Needs a **refactoring** tool
-    * Getting *.ui files to open in Designer not working consistently+    * Getting *.ui files to open in Designer not working consistently (in Linux at least)
       * This is a mime issue: GNOME works as expected, Xfce also I think. But xdg-open is messed up.       * This is a mime issue: GNOME works as expected, Xfce also I think. But xdg-open is messed up.
       * Drag and drop to designer does not work       * Drag and drop to designer does not work
Line 172: Line 172:
  
 === Eric 4 === === Eric 4 ===
-UI is painful by default but can be tweaked. Rope handles refactoring. Hg support listed on homepage but is only available in Eric 5. PyLint plugin available. Lotsa custom tweaks and plugin downloading required.+The default UI is painful by default but can be tweaked. Rope handles refactoring. Hg support listed on homepage but is only available in Eric 5. PyLint plugin available. Lotsa custom tweaks and plugin downloading required.
  
-A project wizard exists but doesn't really make a PyQt4 project. Adding forms is a little different but doable -- but I can't figure out how to add custom slots to e.g. ''mainwindow.py'' because any changes to the ''mainwindow.ui'' file requires "recompiling" to ''mainwindow.py'', nuking all your changes. This may be fixable with a change to the template so it uses the same +A project wizard exists but doesn't really make a PyQt4 project. Adding forms is a little different but doable -- but I can't figure out how to add custom slots to e.g. ''mainwindow.py'' because any changes to the ''mainwindow.ui'' file requires "recompiling" to ''mainwindow.py'', nuking all your changes. Solution seem to be not to use the "Eric way" of building forms--i.e., compiling the py files from ui files--and instead use the "Monkey Studio way" of reading the ui file into a module when it runs. This may be fixable with a change to the template so it uses the same 
 <code python> <code python>
 from PyQt4 import uic from PyQt4 import uic
Line 193: Line 193:
  
 == Autocompletion == == Autocompletion ==
-There are there autocompletion/calltip providers available: QScintilla, Rope (a plugin that also handles refactoring), and Assitant (a plugin).+There are three autocompletion/calltip providers available: QScintilla, Rope (a plugin that also handles refactoring), and Assitant (a plugin). 
 == QScintilla == == QScintilla ==
-To get QScintilla to give decent results, you need to point it to API files. This can be done by installing package eric-api-files and manually pointing Eric at them (//Settings->Preferences->Editor->API//). There's also a script eric4-api to make apis for you. The resulting files are full of ?4 and other strange things the meanings of which are unknown to me.+To get QScintilla to give decent results, you need to point it to API files. This can be done by installing package eric-api-files and manually pointing Eric at them (//Settings->Preferences->Editor->API//). There's also a script eric4-api to make apis for you. The resulting files are full of ?4 and other strange things the meanings of which are unknown to me. You only need to configure the API file location once. However--and this is the major problem with API-based autocomplete/calltips--if the API changes you'll have to manually update it. And you will forget to do that. 
 == Rope == == Rope ==
 Rope's offerings were quite poor until I changed its config to this one (which takes its values from a Rope testing script I downloaded from the Spyder Google Project Hosting site): Rope's offerings were quite poor until I changed its config to this one (which takes its values from a Rope testing script I downloaded from the Spyder Google Project Hosting site):
Line 297: Line 299:
  
 == Assistant == == Assistant ==
-Setting up Assistant . Supposedly it "adds support for icons in completions determined from document."((http://eric-ide.python-projects.org/eric-news-2008.html)) Like the QScintilla autocompletion, it requires API files.+Setting up Assistant also requires API files. Supposedly it "adds support for icons in completions determined from document."((http://eric-ide.python-projects.org/eric-news-2008.html))
  
 == The experience == == The experience ==
 If the problem with Rope calltips can be solved (no arguments shown) then Eric4 would be the one to use. The best interim solution seems to be to let Rope do autocomplete and Assistant do calltips. This is a usable but imperfect setup. Eric ships with a command-line tool for generating API files from source files. If the problem with Rope calltips can be solved (no arguments shown) then Eric4 would be the one to use. The best interim solution seems to be to let Rope do autocomplete and Assistant do calltips. This is a usable but imperfect setup. Eric ships with a command-line tool for generating API files from source files.
  
-Eric Assistant makes minimal use of icons in popups -- subjectively better than Spyder (but without the extra info) and not as nice as Editra (but more complete).+Eric Assistant makes minimal use of icons in its popups -- subjectively better than Spyder (but without the extra info) and not as nice as Editra (but more complete).
  
-At the moment, I am inclined to rate Spyder and Editra's tied for first (for different reasons) and Eric'in third -- but this very well may change.+At the moment, I am inclined to rate Spyder and Editra's tied (for different reasons) and just ahead of Eric's -- but this very well may change.
  
 == Other == == Other ==
Line 313: Line 315:
  
 Debugger works but doesn't seem that friendly. Debugger works but doesn't seem that friendly.
 +
 +Has qt resource file support.
  
 == Conclusion ==  == Conclusion == 
-Maybe. Major hassle setting it up but can be simplified with by distributing an ''*.ini'' file, icons, api files (for autocompletion) and instructions. If project and form adding/handling can be sorted out, it's a possibility (but doing this within the IDE structure is looking increasingly grim). Getting rid of the "arguments" dialog when executing would be nice, as would better GUI icons in general (which I have taken care of). Biggest con: Autocomplete/calltip needs API files (rather than being ) and an odd mixture of tools.+Maybe. Major hassle setting it up but can be simplified with by distributing an ''*.ini'' file, icons, API files and instructions. If project and form adding/handling can be sorted out, it's a possibility (but doing this within the IDE structure is looking increasingly grim). Getting rid of the "arguments" dialog when executing would be nice, as would better GUI icons in general (which I have taken care of). Biggest con: Autocomplete/calltip needs API files (rather than being ) and an odd mixture of tools.
  
 === Monkey Studio === === Monkey Studio ===
Line 341: Line 345:
   * Built-in CLI debugger (pdb) with menubar access to winpdb   * Built-in CLI debugger (pdb) with menubar access to winpdb
     * Winpdb doesn't work with at least one example though (though it starts file from the command line). [[https://code.google.com/p/spyderlib/issues/detail?id=623|Bug report]] filed.     * Winpdb doesn't work with at least one example though (though it starts file from the command line). [[https://code.google.com/p/spyderlib/issues/detail?id=623|Bug report]] filed.
 +    * If the project path has spaces in it, opening files in external editors seems not to work. (More testing with a project whose name does not start with a number is required before submitting a bug.)
     * No way I found to add "user commands"     * No way I found to add "user commands"
   * Good looking PyLint results   * Good looking PyLint results
qt/pyqt_ide_options.1303319191.txt.gz · Last modified: 2011/04/20 17:06 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki