# Qtruby and Qwt

**URL:** <https://www.ruby-forum.com/t/qtruby-and-qwt/82264>\
**Category:** Ruby\
**Created:** [January 18, 2007, 4:55pm UTC](https://www.ruby-forum.com/t/qtruby-and-qwt/82264 "2007-01-18T16:55:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fredrik\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@Fredrik\_J](https://www.ruby-forum.com/u/Fredrik_J)\
**Post date:** [January 18, 2007, 4:55pm UTC](https://www.ruby-forum.com/t/qtruby-and-qwt/82264/1 "2007-01-18T16:55:18Z")

</div>

I am trying to set up a “live” plotting in my Qtruby application (see  
my earlier post), and it seems that the Qwt library might be what I am  
looking for. As I understand it, Qtruby supports Qwt, but I can’t find  
much documentation about it. Is there anybody out there with a simple  
example of plotting with Qwt in Ruby?

/Fredrik

---

<div class="post-metadata">

**Author:** ![Fredrik\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@Fredrik\_J](https://www.ruby-forum.com/u/Fredrik_J)\
**Post date:** [January 18, 2007, 6:51pm UTC](https://www.ruby-forum.com/t/qtruby-and-qwt/82264/2 "2007-01-18T18:51:15Z")

</div>

> I am trying to set up a “live” plotting in my Qtruby application (see  
> my earlier post), and it seems that the Qwt library might be what I am  
> looking for. As I understand it, Qtruby supports Qwt, but I can’t find  
> much documentation about it. Is there anybody out there with a simple  
> example of plotting with Qwt in Ruby?

It’s not documented greatly, unfortunately, but it should work. Your  
past posts  
indicate you seem to be using QtRuby for Qt3. Is that right? I think  
that the Qwt  
support in QtRuby is only for the Qt4 library version (and corresponding  
Qwt version

- 5.x).

Caleb

---

<div class="post-metadata">

**Author:** ![Fredrik\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@Fredrik\_J](https://www.ruby-forum.com/u/Fredrik_J)\
**Post date:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/qtruby-and-qwt/82264/3 "2007-01-19T16:30:55Z")

</div>

Caleb T. wrote:

> > I am trying to set up a “live” plotting in my Qtruby application (see  
> > my earlier post), and it seems that the Qwt library might be what I am  
> > looking for. As I understand it, Qtruby supports Qwt, but I can’t find  
> > much documentation about it. Is there anybody out there with a simple  
> > example of plotting with Qwt in Ruby?
> 
> It’s not documented greatly, unfortunately, but it should work. Your past posts  
> indicate you seem to be using QtRuby for Qt3. Is that right? I think that the Qwt  
> support in QtRuby is only for the Qt4 library version (and corresponding Qwt version
> 
> - 5.x).  
> No, it does work with Qt3 QtRuby too. I had some problems with parsing  
> Qt properties in the Qt4 version of Qwt, but I did get that one working  
> in the end. For both Qt3 and Qt4, you need to install the Qwt headers  
> into the same include directory as the Qt ones, and configure QtRuby  
> with ‘–enable-qwt=yes’ to build with the qwt libs.

– Richard

---

<div class="post-metadata">

**Author:** ![Fredrik\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@Fredrik\_J](https://www.ruby-forum.com/u/Fredrik_J)\
**Post date:** [January 19, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/qtruby-and-qwt/82264/4 "2007-01-19T16:31:27Z")

</div>

removed\_email\_address@domain.invalid wrote:

> No, it does work with Qt3 QtRuby too. I had some problems with parsing  
> Qt properties in the Qt4 version of Qwt, but I did get that one working  
> in the end. For both Qt3 and Qt4, you need to install the Qwt headers  
> into the same include directory as the Qt ones, and configure QtRuby  
> with ‘–enable-qwt=yes’ to build with the qwt libs.
> 
> – Richard

Are you sure about that? In qtruby-1.0.13 I configure with this:  
./configure --with-smoke=“qt” --with-qt-dir=/usr/local/qt  
–enable-qwt=yes --prefix=/usr  
but I cannot see that configure is doing anything about that. Anyway, I  
complete the installation and try  
$ irb

> require ‘Qwt’  
> LoadError: no such file to load – Qwt  
> and I guess that means it was not installed?

/Fredrik

---

<div class="post-metadata">

**Author:** ![Fredrik\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@Fredrik\_J](https://www.ruby-forum.com/u/Fredrik_J)\
**Post date:** [September 25, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/qtruby-and-qwt/82264/5 "2007-09-25T22:41:20Z")

</div>

Fredrik J wrote:

> ./configure --with-smoke=“qt” --with-qt-dir=/usr/local/qt  
> –enable-qwt=yes --prefix=/usr  
> but I cannot see that configure is doing anything about that. Anyway, I  
> complete the installation and try  
> $ irb
> 
> > require ‘Qwt’  
> > LoadError: no such file to load – Qwt  
> > and I guess that means it was not installed?  
> > Ah bother, Caleb was right - it looks like I never did a Qt3 version. I  
> > remembered getting Qwt to work twice and the second one being a bit  
> > more work. I was thinking of Qwt 4.x vs Qwt 5.x though, and I’ve only  
> > ever got them working with the Qt4 version of QtRuby. Sorry about  
> > wasting your time on that. But I don’t think it would be too hard to  
> > get Qwt working for Qt3 QtRuby though all the same.

– Richard
