Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QwtPlot. Promote to...

QwtPlot. Promote to...

Scheduled Pinned Locked Moved General and Desktop
11 Posts 2 Posters 4.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 8Observer88 Offline
    8Observer88 Offline
    8Observer8
    wrote on last edited by
    #1

    Hello! This is my steps:

    • I created a MainWindow application

    • I added in the .pro file this code:
      [CODE]QWT_LOCATION = c:/Qwt-6.1.0
      INCLUDEPATH += $${QWT_LOCATION}/include
      LIBS = -L$${QWT_LOCATION}/lib
      -lqwtd[/CODE]

    • I create the class "Plot":

    Plot.h
    [CODE]
    #ifndef PLOT_H
    #define PLOT_H

    #include "qwt_plot.h"

    class Plot : public QwtPlot
    {
    public:
    Plot( QWidget *parent = 0 );
    };

    #endif // PLOT_H
    [/CODE]

    Plot.cpp
    [CODE]
    #include "Plot.h"

    Plot::Plot( QWidget *parent ) :
    QwtPlot( parent )
    {
    }
    [/CODE]

    • I opened the file "MainWindow.ui" and I put on the form the widget "Widget"
    • I promoted the "Widget" to "Plot"
    • I ran my application and received this message:
      [QUOTE]The program has unexpectedly finished.[/QUOTE]
    1 Reply Last reply
    0
    • 8Observer88 Offline
      8Observer88 Offline
      8Observer8
      wrote on last edited by
      #2

      This application doesn't work too:

      VerySimplePlot.pro
      [CODE]

      QT += widgets

      INCLUDEPATH += "C:/Qwt-6.1.0/include"
      LIBS += "C:/Qwt-6.1.0/lib/libqwtd.a"

      SOURCES +=
      main.cpp
      [/CODE]

      main.cpp
      [CODE]

      #include <QApplication>
      #include "qwt_plot.h"

      int main( int argc, char *argv[] )
      {
      QApplication app( argc, argv );

      QwtPlot plot;
      
      plot.show();
      
      app.exec();
      

      }
      [/CODE]

      Output:
      [QUOTE]
      The program has unexpectedly finished.
      [/QUOTE]

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        What does a run through the debugger tells you ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • 8Observer88 Offline
          8Observer88 Offline
          8Observer8
          wrote on last edited by
          #4

          This is all what I have:
          http://i.pixs.ru/storage/9/5/9/300png_5816215_13587959.png

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            A dll can't be found, so I guess that the Qwt dll(s) can't be found. Go in the run part for the Project panel, edit the PATH environment variable and add there the path to the folder containing the Qwt dlls

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • 8Observer88 Offline
              8Observer88 Offline
              8Observer8
              wrote on last edited by
              #6

              SGaist, thank you for reply!

              I think it is because I built Qwt in Qt5.1.1 and I try to use it in Qt5.3.1

              P.S. I will use QCustomPlot: http://www.qcustomplot.com/index.php/tutorials/settingup

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                You're welcome !

                When it comes to designer plugins, you need to match the Qt version used to build Qt Creator and the one used to build the plugin.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • 8Observer88 Offline
                  8Observer88 Offline
                  8Observer8
                  wrote on last edited by
                  #8

                  Why do you talk about plugins? Is it useful for Qt developer? What does it give?

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Because when you want to use a custom widget in Designer, you have to use a plugin. Qwt provides one to use it's sets of widgets with Designer.

                    Look at the "Adding Qt Designer Plugins" chapter from the documentation for more informations

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • 8Observer88 Offline
                      8Observer88 Offline
                      8Observer8
                      wrote on last edited by
                      #10

                      What do you think about QCustomPlot, QChart and MathGL? Are they better than Qwt?

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        I can't comment, I've only used Qwt so far as it suited my needs pretty well.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved