Results 1 to 3 of 3

Thread: Qt4 designer on RPi no module named qwt_plot

  1. #1
    Join Date
    Oct 2012
    Posts
    3
    Qt products
    Platforms
    Unix/X11

    Default Qt4 designer on RPi no module named qwt_plot

    Hi I have been going around in circles on this problem and Im looking for help.

    I have Qt4 designer running on the latest version of raspbian on a rasbperry pi. This is ready complied Qt4 so I have not built it like other examples I have found on the forum.

    Using pyuic4 to generate python GUI scripts from the UI file works OK until I try and use the Qwt widgets within QT 4 designer.

    The last line in the generated gui script 'from qwt_plot import QwtPlot' causes the calling python script to give an error 'ImportError: No module named qwt_plot'

    Checking /usr/include/qwt-qt4 , this folder shows qwt_plot.h

    Trying a plot GUI directly from python, using Eli Bendersky's qwt_dataplot.pyw this calls QwtPlot and no problems.

    I am now out of my depth and would appreciate help

    thanks

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Qt4 designer on RPi no module named qwt_plot

    The module is not called "qwt_plot", from Eli Bendersky's qwt_dataplot.pyw:
    Qt Code:
    1. import PyQt4.Qwt5 as Qwt
    2.  
    3. // and later
    4. self.plot = Qwt.QwtPlot(self)
    To copy to clipboard, switch view to plain text mode 

    The include file in /usr/include/qwt-qt4 is for C++ programs and has nothing (directly) to do with Python program.s

  3. #3
    Join Date
    Jun 2013
    Posts
    1
    Qt products
    Platforms
    Unix/X11

    Default Re: Qt4 designer on RPi no module named qwt_plot

    One way to resolve this is to create a file in the same directory called qwt_plot.py
    In that file, place the line
    from PyQt.Qwt5 import QwtPlot

    that will allow the line
    self.qwtPlot = QwtPlot(self.centralwidget)
    to find and instantiate the class

Similar Threads

  1. Qt designer "Module not found"
    By balisingh in forum Qt Quick
    Replies: 0
    Last Post: 27th August 2012, 18:59
  2. Named pipes in Qt
    By xenko in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2012, 09:05
  3. qwt_plot.h: No such file or directory
    By qt_developer in forum Qt Programming
    Replies: 2
    Last Post: 14th June 2012, 07:30
  4. Replies: 5
    Last Post: 10th November 2010, 15:39

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.