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

Qcustomplot slider

Scheduled Pinned Locked Moved Turkish
1 Posts 1 Posters 1.5k Views
  • 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 8 Dec 2014, 11:17 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

    1/1

    8 Dec 2014, 11:17

    • Login

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