Showing posts with label qtruby. Show all posts
Showing posts with label qtruby. Show all posts
Friday, February 20, 2009
Color Wheel Demo
This video was captured using xvidcap on my Linux box. It demonstrates the functionality of the color wheel demo in QtRuby. Colors are added by clicking in the center of the ring, and removed by clicking elsewhere. The color selecting tool is a standard widget provided by QColorDialog, which I've mentioned before.
This is my first screencast and it shows the programs functions nicely (though kinda fast), so I might be doing more of this in the future.
Tuesday, February 3, 2009
Porting QT between C++ and Ruby
I have an assignment due next week for a graphics class I'm taking and I have given the ability to use whatever language or windowing libraries I want, provided they are portable. The only condition is that we are required to use OpenGL. Well, I wrote the project initially using C with GLUT, and then after realizing that my C code is really sketch, and ported it to a more familiar environment C++/Qt.
OpenGL with Qt is not really a much different animal than with GLUT, but it seems like OpenGL integrates better with the interface in Qt. I'd like to also try out OpenGL with FxRuby and WxWidgets to get a better idea of how to work with both traditional GUI interfaces while adding OpenGL effects to the mix. The OpenGL page for Ruby has a lot of helpful tips.
OpenGL with Qt is not really a much different animal than with GLUT, but it seems like OpenGL integrates better with the interface in Qt. I'd like to also try out OpenGL with FxRuby and WxWidgets to get a better idea of how to work with both traditional GUI interfaces while adding OpenGL effects to the mix. The OpenGL page for Ruby has a lot of helpful tips.
Friday, January 23, 2009
New Beginnings
Lately I've been working a lot of QtRuby. Linux development with it is quite quick, and and the desert color scheme of gvim makes things easy to read. I've already managed to use both a custom QWidget for 2D display and a QGLWidget using OpenGL together displaying information based upon the same model. Being able to use slots and signals is also helpful for breaking up your GUI into manageable and distinct parts.
There is a good translation of the Qt tutorials for Ruby, and explains many of the subtleties of how to do slots/signals in Ruby, and some other things which had been implemented as macros.
Getting QtRuby to run on Windows is a different story. The gem I tried was broken because of a buffer error in zlib, so I had to find a work around. This installation guide was very helpful and covers everything from installing Ruby to getting Qt, and getting the QtRuby bindings. Make sure you install mingw.exe as part of the Qt installation, and have qtruby4installer.exe pick the correct directory to find QtCore4.dll in (where you just installed Qt). Also, after you install Qt, you need to fire up a new console, or restart Explorer to get the new paths to load to find this .dll.
There is a good translation of the Qt tutorials for Ruby, and explains many of the subtleties of how to do slots/signals in Ruby, and some other things which had been implemented as macros.
Getting QtRuby to run on Windows is a different story. The gem I tried was broken because of a buffer error in zlib, so I had to find a work around. This installation guide was very helpful and covers everything from installing Ruby to getting Qt, and getting the QtRuby bindings. Make sure you install mingw.exe as part of the Qt installation, and have qtruby4installer.exe pick the correct directory to find QtCore4.dll in (where you just installed Qt). Also, after you install Qt, you need to fire up a new console, or restart Explorer to get the new paths to load to find this .dll.
Subscribe to:
Posts (Atom)