54 #include <QGridLayout>
56 #include <QPushButton>
63 "But soft, what light through yonder window breaks? / "
64 "It is the east, and Juliet is the sun. / "
65 "Arise, fair sun, and kill the envious moon, / "
66 "Who is already sick and pale with grief / "
67 "That thou, her maid, art far more fair than she."
71 "To-morrow, and to-morrow, and to-morrow, / "
72 "Creeps in this petty pace from day to day, / "
73 "To the last syllable of recorded time; / "
74 "And all our yesterdays have lighted fools / "
75 "The way to dusty death. Out, out, brief candle! / "
76 "Life's but a walking shadow, a poor player, / "
77 "That struts and frets his hour upon the stage, / "
78 "And then is heard no more. It is a tale / "
79 "Told by an idiot, full of sound and fury, / "
83 const QString harry =
tr(
"Feeling lucky, punk?");
85 textSamples << romeo << macbeth << harry;
90 elidedText =
new ElidedLabel(textSamples[sampleIndex],
this);
120 layout->addWidget(switchButton, 0, 2);
121 layout->addWidget(exitButton, 0, 3);
122 layout->addWidget(widthSlider, 1, 1, 1, 3);
123 layout->addWidget(heightSlider, 2, 0);
135 int maxWidth = widthSlider->
width();
137 widthSlider->
setValue(maxWidth / 2);
139 int maxHeight = heightSlider->
height();
141 heightSlider->
setValue(maxHeight / 2);
148 void TestWidget::switchText()
150 sampleIndex = (sampleIndex + 1) % textSamples.size();
151 elidedText->
setText(textSamples.at(sampleIndex));
156 void TestWidget::onWidthChanged(
int width)
161 void TestWidget::onHeightChanged(
int height)
void setText(const QString &text)
[0]
void elisionChanged(bool elided)
int value
the slider's current value
void valueChanged(int value)
void setInvertedAppearance(bool)
The QGridLayout class lays out widgets in a grid.
The QLabel widget provides a text or image display.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
The QResizeEvent class contains event parameters for resize events. \inmodule QtGui.
The QSlider widget provides a vertical or horizontal slider.
The QString class provides a Unicode character string.
GLint GLsizei GLsizei height
GLuint GLsizei const GLchar * label
[43]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent