OGS
QValueTooltipSlider Class Reference

Detailed Description

A QSlider which shows its value as a tooltip when moved.

Definition at line 21 of file QValueTooltipSlider.h.

#include <QValueTooltipSlider.h>

Inheritance diagram for QValueTooltipSlider:
[legend]
Collaboration diagram for QValueTooltipSlider:
[legend]

Public Slots

void setTooltipValue (int value)
 

Public Member Functions

 QValueTooltipSlider (QWidget *parent=nullptr)
 

Constructor & Destructor Documentation

◆ QValueTooltipSlider()

QValueTooltipSlider::QValueTooltipSlider ( QWidget * parent = nullptr)
explicit

Definition at line 22 of file QValueTooltipSlider.cpp.

22 : QSlider(parent)
23{
24 connect(this, SIGNAL(sliderMoved(int)), this, SLOT(setTooltipValue(int)));
25}
void setTooltipValue(int value)

References setTooltipValue().

Member Function Documentation

◆ setTooltipValue

void QValueTooltipSlider::setTooltipValue ( int value)
slot

Definition at line 27 of file QValueTooltipSlider.cpp.

28{
29 QToolTip::showText(QCursor::pos(), QString::number(value));
30}

Referenced by QValueTooltipSlider().


The documentation for this class was generated from the following files: