Tag: Qt4

Brew Install Qt4 and Ruby Bindings

March 15, 2011 » Consume, Geek

The Ruby gem for Qt4 bindings, appropriately called qtbindings, do not build by default with brew installed Qt4 libs.

There is a quick fix, but it’s hidden in the issues on github. Essentially you just need to symlink the brew headers to an expected location.

$ for DIR in /usr/local/Cellar/qt/4.7.1/lib/*.framework; do ln -s $DIR/Headers ${DIR%%/lib/*}/include/$(basename $DIR .framework); done

After that is run, gem install qtbindings runs like a champ.

Tags: , ,

MarkedUp: The Power of Python

August 5, 2010 » Consume, Geek

Yesterday I was stuck at the office while Darcy got a flat replaced. I decided to make a Markdown editor real quick, since I’m always using the web dingus to preview it, and that gets old.

I found the python-markdown2 library, and then decided to try out the WebKit integration in Qt4.

The best word for it is painless. Seriously, I got the first version glued together in about ten minutes, including finding the markdown library and reading all the docs for QWebView. It’s a brutal hack, but it worked just fine, and only took up 45 lines of code.

I’ve since dropped in three more markup languages, as well as cleaned it up to something readable. But I doubt I have more than a couple hours invested thus far.I think this is a quintessential demonstration of the power of Python, which breaks down to three things.

  1. Fast development
    No compile cycle, it reduces the barrier to creating a prototype.
  2. Huge Ecosystem
    There is a library for everything and it’s all easy to get to and use.
  3. Good Documentation & Intuitive Behavior
    Most packages have good documentation, and those that don’t still behave intuitively. Just pydoc around until you find what you need.

MarkedUp is now feature complete, stable, and available at your local github.

The MarkedUp Editor