blob: 3d9b42d6fbaca7cc4d4f958dfae74e8384895068 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#ifndef TESTWIDGET_H
#define TESTWIDGET_H
#include <QWidget>
#include <QStringList>
#include <QSlider>
#include <QComboBox>
class ElidedLabel;
//! [0]
class TestWidget : public QWidget
{
Q_OBJECT
public:
TestWidget(QWidget *parent = 0);
protected:
void resizeEvent(QResizeEvent *event);
private slots:
void switchText();
void onWidthChanged(int width);
void onHeightChanged(int height);
private:
int sampleIndex;
QStringList textSamples;
ElidedLabel *elidedText;
QSlider *heightSlider;
QSlider *widthSlider;
};
//! [0]
#endif // TESTWIDGET_H
|