Skip to content
  • 0 Votes
    2 Posts
    382 Views
    timob256T

    @timob256 In general , there was one mistake , for some reason I thought that by setting the size of the vector , it would correct everything itself , but it turned out not to be so

    void MainWindow::slotProcessDatagrams() { QByteArray baDatagram_in; do { baDatagram_in.resize(m_pudp_in->pendingDatagramSize()); m_pudp_in->readDatagram(baDatagram_in.data(), baDatagram_in.size()); } while(m_pudp_in->hasPendingDatagrams()); QDataStream in(&baDatagram_in, QIODevice::ReadOnly); in.setVersion(QDataStream::Qt_5_3); in >> str_priem; // принимаем сообщение str_x = str_priem.section(' ',0,0); str_y = str_priem.section(' ',1); if(my_int >= 80) { // clear firs element // x.pop_back(); // y.pop_back(); // x.removeLast(); // y.removeLast(); x.pop_front(); //последний из вектора y.pop_front(); x << str_x.toDouble(); y << str_y.toDouble(); } else { x << str_x.toDouble(); y << str_y.toDouble(); my_int = my_int + 1; } // чистим старое отрисовываем новое wGraphic->graph(0)->clear(); wGraphic->graph(0)->rescaleAxes(); // wGraphic->replot(); // Отрисовываем содержимое полотна wGraphic->graph(0)->setData(y,x); // Устанавливаем координаты точек графика wGraphic->replot(); // Отрисовываем содержимое полотна // Очищаем принятую строку str_priem.clear(); }

    True, a new error jumped (for some reason the last and first point somehow connects, I don't know how to break)

    введите сюда описание изображения

  • 0 Votes
    8 Posts
    5k Views
    A

    Hi,
    Thanks for sharing your experience. I tried to lunch the code but it only shows a "crashed" error.
    @romain-donze would you please (if possible) share this project for me? I'm also a newbie and trying to visualize some real time data in histograph chart.

  • 0 Votes
    4 Posts
    943 Views
    SGaistS

    Hi,

    @WLOrion said in Introduction in Qwt:

    I didn't know this behavior of the Qwt Classes.

    This is nothing Qwt specific, it's part of the C++ basics.

    As for tutorial, there's a nice online book that is in German but the author claims that online translator should give you a good enough result in your own language.

  • 0 Votes
    9 Posts
    2k Views
    S

    @CJha try to useOpenGL for series, for qml i use series.useOpenGL = true

  • Plotting a grid like plot in QT

    Unsolved General and Desktop
    3
    0 Votes
    3 Posts
    445 Views
    mrjjM

    Hi
    It would be very easy to draw manually using QML or QPainter
    but do you need zooming and other features QChart provides ?

  • 0 Votes
    4 Posts
    1k Views
    mrjjM

    @Yash001
    Hi, i wish i knew the answer
    but im fairly sure canvas()->width(); just returns the actual widget size and
    not the zoomed area as such.

    Had a look in the help but didnt find the answer on how to get the extent on a zoomed canvas.

  • 0 Votes
    29 Posts
    6k Views
    R

    Thanks for the support guys. I tried making a transparent QPixmap image using Qt::transparent fill for the axis and overlaying it onto my other QPixmap, however it didn't work properly. So I ended up just drawing directly onto the image itself. Not the most efficient method but it seems to work...

  • 0 Votes
    4 Posts
    2k Views
    S

    @aha_1980 Thank you alot Sir your answer was correct and helped to clean up the problem!

    Regards

  • 0 Votes
    3 Posts
    872 Views
    C

    Thank you for your answer! I've yet to find a good introduction into QML for C++ developers, but I was a little put off by the somewhat convoluted approach as different tutorials either don't show any QML or only use it soley to develop a very simple application.

    The main problem I'm struggling is with QML is the ability to generate a GUI based on some set preferences. In my case the amount of e.g tabs in the "Options" pane should be defined by the amount of video files which are currently loaded. Is this easily possible to programatically extend QML GUIs?

  • 0 Votes
    1 Posts
    789 Views
    No one has replied
  • 0 Votes
    2 Posts
    1k Views
    E

    I suggest looking into QCustomPlot.

  • 0 Votes
    1 Posts
    3k Views
    No one has replied