我有,我是能夠使其顯示我希望有一個標籤,顯示我有什麼滑塊的當前值,而當我滑動標尺滑塊和分開,它將更改爲當前位置。事情是在這個環節從qwt.sorceforge.netQwtslider佈局 - 顯示當前值
http://qwt.sourceforge.net/sliders.png
這裏是我的滑代碼:
Slider = new QwtSlider(centralWidget);
Slider->setObjectName(QString::fromUtf8("Slider"));
Slider->setGeometry(QRect(520, 40, 60, 500));
QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Fixed);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(Slider->sizePolicy().hasHeightForWidth());
Slider->setSizePolicy(sizePolicy1);
QFont font;
font.setFamily(QString::fromUtf8("Bitstream Charter"));
font.setPointSize(9);
Slider->setFont(font);
Slider->setCursor(QCursor(Qt::ArrowCursor));
Slider->setOrientation(Qt::Vertical);
Slider->setScalePosition(QwtSlider::LeftScale);
Slider->setBgStyle(QwtSlider::BgTrough);
Slider->setThumbLength(20);
Slider->setThumbWidth(10);
Slider->setBorderWidth(2);
Slider->setRange(xmin, xmax, step);
Slider->setScale(xmin, xmax+1, (xmax+1)/16);
Aaaaaand你的問題是......? – SingerOfTheFall
我想讓我的滑塊顯示標籤中的當前位置。 – SamuelNLP