Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Turkish
  4. Qcustomplot slider
Qt 6.11 is out! See what's new in the release blog

Qcustomplot slider

Scheduled Pinned Locked Moved Turkish
1 Posts 1 Posters 1.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.
  • E Offline
    E Offline
    E_Kk
    wrote on last edited by
    #1

    Merhaba,

    qcustomplot ile grafik çizdiriyorum. Yapmak istediğim horizontalSlider dan gelen verilere göre çizdiğim line ın konumunun değişmesi. line ise x=a gibi bir doğru.

    @
    #include "itemline.h"
    #include "ui_itemline.h"
    #include "qcustomplot.h"

    itemLine::itemLine(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::itemLine)
    {
    ui->setupUi(this);

    QCPItemLine *item = new QCPItemLine(ui->customPlot);
    ui->customPlot->addItem(item);
    item->setPen(QPen(Qt::red));
    item->start->setCoords(1,0);
    item->end->setCoords(1,5);
    
    connect(ui->horizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(horzSliderChanged(int)));
    

    }

    itemLine::~itemLine()
    {
    delete ui;
    }

    void itemLine::horzSliderChanged(int value)
    {
    // gelen değeri item in koordinat değerlerine aktar.
    }

    @

    void horzSliderChanged(int value); slotundaki slider dan gelen veriyi nasıl item e aktarabilirim?

    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