//! [n]
Qt サンプル プロジェクトの C++/QML ソースの( n
= 0, 1, 2 ...) マークアップの意味は何ですか?
例えば:
//! [0]
GLWidget::GLWidget(Helper *helper, QWidget *parent)
: QGLWidget(QGLFormat(QGL::SampleBuffers), parent), helper(helper)
{
elapsed = 0;
setFixedSize(840, 400);
setAutoFillBackground(false);
}
//! [0]
//! [1]
void GLWidget::animate()
{
elapsed = (elapsed + qobject_cast<QTimer*>(sender())->interval()) % 1000;
repaint();
}
//! [1]
//! [2]
void GLWidget::paintEvent(QPaintEvent *event)
{
QPainter painter;
painter.begin(this);
painter.setRenderHint(QPainter::Antialiasing);
helper->paint(&painter, event, elapsed);
painter.end();
}
//! [2]