Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Qwt graph page crashes GUI
Forum Updated to NodeBB v4.3 + New Features

Qwt graph page crashes GUI

Scheduled Pinned Locked Moved 3rd Party Software
qwt
21 Posts 2 Posters 9.5k Views 2 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.
  • M Offline
    M Offline
    MShields
    wrote on last edited by
    #1

    I designed a GUI on qt creator running on a Raspberry Pi on Raspbian.
    Once you reach the graph made by qwt the program quits completely to desktop.
    Notably the program works when you run it from qt creator.
    I suspect I am missing a library.

    K 1 Reply Last reply
    0
    • M MShields

      I designed a GUI on qt creator running on a Raspberry Pi on Raspbian.
      Once you reach the graph made by qwt the program quits completely to desktop.
      Notably the program works when you run it from qt creator.
      I suspect I am missing a library.

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @MShields

      Hi and welcome to devnet

      Concerning your issue, if you can tie it to Qwt graph, you may also send an email to their mailing list..
      You have the dynamic library for Qwt also on your Raspberry Pi?

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MShields
        wrote on last edited by
        #3

        I installed libqwt6 if that is what you are asking

        K 1 Reply Last reply
        0
        • M MShields

          I installed libqwt6 if that is what you are asking

          K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          @MShields
          Yes.
          I am not sure how you do that on Raspberry Pi.
          On windows you would have a dll and you could get possibly such a problem when the dll is missing.

          Again the Qwt mailing might be a good option as well, when the problem is tied to Qwt features. AFAIK Qwt is still considered as a third party library based on Qt. I have seen feedback from Uwe on this forum in the past. However, I am not sure, if they(he) monitor this forum closely.

          Typically Qwt related posts are meant to go to 3rd party software. However, your post does also here. If you like I can move it to 3rd party software.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • M Offline
            M Offline
            MShields
            wrote on last edited by
            #5

            That would probably be useful Thank You

            K 2 Replies Last reply
            0
            • M MShields

              That would probably be useful Thank You

              K Offline
              K Offline
              koahnig
              wrote on last edited by
              #6

              @MShields

              Moved to "3rd Party Software"

              Vote the answer(s) that helped you to solve your issue(s)

              1 Reply Last reply
              0
              • M MShields

                That would probably be useful Thank You

                K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                @MShields

                Just saw that you posted the same question again and one of the moderators closed it.

                Did you contact Qwt's mailing list?
                When you can limited your problem to Qwt it is really the best source to post there. However, in my opinion you shall make sure that it is not a general Qt problem then.

                Also you shave a bit of an exotic issue. Therefore, out of personal experience you might have to wait longer than a day.

                Vote the answer(s) that helped you to solve your issue(s)

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  MShields
                  wrote on last edited by
                  #8

                  While playing with the code I discovered that if i comment out the lines:

                  grid->setMajorPen(Qt::gray,1,Qt::Dashline);
                  grid->setMinorPen(Qt::gray,1,Qt::Dashline);
                  curve1->setPen(colour1);
                  curve1->setSymbol(symbol1)

                  grid is a QwtPlotGrid and curve1 is a QwtPlotCurve.

                  Then the code works. However i still need to change how the curve looks.

                  M 1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    koahnig
                    wrote on last edited by
                    #9

                    The style of QwtPlotCurve can be changed with setStyle and setSymbol

                    Vote the answer(s) that helped you to solve your issue(s)

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      MShields
                      wrote on last edited by
                      #10

                      As noted setSymbol causes the program to crash

                      K 1 Reply Last reply
                      0
                      • M MShields

                        As noted setSymbol causes the program to crash

                        K Offline
                        K Offline
                        koahnig
                        wrote on last edited by
                        #11

                        @MShields said:

                        As noted setSymbol causes the program to crash

                        No, you didn't.

                        What is the symbol you are setting?

                        Vote the answer(s) that helped you to solve your issue(s)

                        1 Reply Last reply
                        0
                        • M MShields

                          While playing with the code I discovered that if i comment out the lines:

                          grid->setMajorPen(Qt::gray,1,Qt::Dashline);
                          grid->setMinorPen(Qt::gray,1,Qt::Dashline);
                          curve1->setPen(colour1);
                          curve1->setSymbol(symbol1)

                          grid is a QwtPlotGrid and curve1 is a QwtPlotCurve.

                          Then the code works. However i still need to change how the curve looks.

                          M Offline
                          M Offline
                          MShields
                          wrote on last edited by
                          #12

                          @MShields said:

                          curve1->setSymbol(symbol1)

                          As shown in previous post, the last of the four commented out lines

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            MShields
                            wrote on last edited by
                            #13

                            Full code is

                            QwtSymbol *symbola1 = new QwtSymbol( QwtSymbol::Ellipse, QBrush( Qt::black ), QPen( Qt::red, 2 ), QSize( 8, 8 ) );
                            curve1->setSymbol( symbola1 );

                            1 Reply Last reply
                            0
                            • K Offline
                              K Offline
                              koahnig
                              wrote on last edited by
                              #14

                              So if you leave the other three lines and comment only the fourth line, the program is not crashing?

                              Vote the answer(s) that helped you to solve your issue(s)

                              1 Reply Last reply
                              0
                              • M Offline
                                M Offline
                                MShields
                                wrote on last edited by
                                #15

                                To be clear it will crash when all four of these lines are commented out. The program will crash if any one of the four are uncommented.

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  MShields
                                  wrote on last edited by
                                  #16

                                  Here is the all the lines as is:

                                  // grid->setMajorPen(Qt::gray, 1, Qt::DashLine);
                                  // grid->setMinorPen(Qt::gray, 1, Qt::DashLine);

                                  QColor colour1 = Qt::red;
                                  // curve1->setPen(colour1);
                                  QwtSymbol *symbola1 = new QwtSymbol( QwtSymbol::Ellipse, QBrush( Qt::black ), QPen( Qt::red, 2 ), QSize( 8, 8 ) );
                                  // curve1->setSymbol( symbola1 );

                                  If any of the lines which are commented out are uncommented out the the program crashs when it reachs that page.

                                  1 Reply Last reply
                                  0
                                  • K Offline
                                    K Offline
                                    koahnig
                                    wrote on last edited by
                                    #17

                                    Is anywhere in the same scope "grid" or "curve1" used successfully?

                                    Vote the answer(s) that helped you to solve your issue(s)

                                    1 Reply Last reply
                                    0
                                    • M Offline
                                      M Offline
                                      MShields
                                      wrote on last edited by
                                      #18

                                      grid and curve1 are successfully used in other situations

                                      e.g
                                      grid->enableX(true);
                                      grid->attach(myPlot);

                                      curve1->setSamples(Column1, Column2, 26);
                                      curve1->setYAxis(QwtPlot::yLeft);

                                      K 1 Reply Last reply
                                      0
                                      • M MShields

                                        grid and curve1 are successfully used in other situations

                                        e.g
                                        grid->enableX(true);
                                        grid->attach(myPlot);

                                        curve1->setSamples(Column1, Column2, 26);
                                        curve1->setYAxis(QwtPlot::yLeft);

                                        K Offline
                                        K Offline
                                        koahnig
                                        wrote on last edited by
                                        #19

                                        @MShields said:

                                        grid and curve1 are successfully used in other situations

                                        e.g
                                        grid->enableX(true);
                                        grid->attach(myPlot);

                                        curve1->setSamples(Column1, Column2, 26);
                                        curve1->setYAxis(QwtPlot::yLeft);

                                        That might be, but the question is if they are still valid when you are trying to access where you the crash. E.g. try to modify curve1 with setSymbol when you are able to use those pointers successfully.

                                        For instance this way:

                                        curve1->setSamples(Column1, Column2, 26);
                                        curve1->setYAxis(QwtPlot::yLeft);
                                        QColor colour1 = Qt::red;
                                        curve1->setPen(colour1);
                                        QwtSymbol *symbola1 = new QwtSymbol( QwtSymbol::Ellipse, QBrush( Qt::black ), QPen( Qt::red, 2 ), QSize( 8, 8 ) );
                                        curve1->setSymbol( symbola1 );
                                        

                                        Vote the answer(s) that helped you to solve your issue(s)

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          MShields
                                          wrote on last edited by
                                          #20

                                          That is how it is suppose to work, curve1 has setSamples, setYAxis, etc set up.
                                          The problem is when setPen or setSymbol are added in. I have had to comment them out to prevent the program from crashing.

                                          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