User Tools

Site Tools


qt:netbeans_c_c_fortran

Netbeans + C/C++/Fortran

Apparently, the classic Java IDE Netbeans has C/C++ and Fortran support. And even more interesting, said C/C++/Fortran package also has Qt support.

Netbeans itself is Java/Swing based, so that means the IDE UI will look a bit goofy, but I personally don't mind sort of like how the Metal look-and-feel looks and feels (except for the file browser, which is a marathon race beyond fugly, and the font rendering, which after a gazillion years is still sucky…come on Oracle!). The Qt part of the package integrates with Qt Designer for layout tasks. It opens *.ui files directly into Qt Designer from the IDE.

I sorta like this setup. I can get my brain around it, it seems full-featured, and while it's not a platform standard look and feel, the way things work is fairly standard.

The pros

  • Code completion isn't bad (but Qt Creator's is probably better; this needs testing).
  • Support for Python development is allegedly available, but development may be stalled.
  • Automated package building in tar, deb, etc. formats(!)
  • Pretty profiling
    • But I've had trouble getting it going
  • It's Netbeans–it won't become abandonware.
    • But the C/C++/Fortran support is less guaranteed.)

The cons

  • The project structure seems to be a bit goofy. Rather than having a *.pro file at the top level, it creates different *.pro files for debug and release (along with a heap of other files) in the nbproject subdirectory. This makes it hard to move the project to another IDE and/or import pre-existing projects. This is easily the most disconcerting con. With one export test case that I tried, moving the *.pro file up to the source files dir and making a few tweaks to the file let me open, build, and run the project in Qt Creator. See this for more info on importing projects.
  • Less-than-optimal Swing font rendering (come on Oracle!)
  • You need to manually add code to the project that a more highly integrated setup (e.g., Qt Creator) would normally do for you, such as:
    • to the main.cpp file:
      #include <formname>.h
    • to the main function in main.cpp
      <FormName> main_form;
      main_form.show();
    • headers and implementations for all the slots in <formname>.h and <formname>.cpp
    • etc.
  • Adding custom project templates (which would solve the above issue) doesn't seem to be an easy task.
  • By default Netbeans opens a terminal shell when you debug projects and the debugger sees warnings (I think) – but it does not automatically dispose of it when you are done. Fortunately, you can make this go away by setting the project options to use the internal terminal or output pane.

Thoughts

In spite of the quirks, this seems to be a credible platform. It needs a good “Qt Application” project template. PyQt support is theoretically there but needs work, possibly consisting only of a “PyQt Application” project template and “Qt Form” and “Qt Dialog” file templates

qt/netbeans_c_c_fortran.txt · Last modified: 2011/04/07 14:38 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki