Файл примера dialog.cpp widgets/wiggly/dialog.cpp
#include <QtGui>
#include "dialog.h"
#include "wigglywidget.h"
Dialog::Dialog(QWidget *parent)
: QDialog(parent)
{
WigglyWidget *wigglyWidget = new WigglyWidget;
QLineEdit *lineEdit = new QLineEdit;
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(wigglyWidget);
layout->addWidget(lineEdit);
setLayout(layout);
connect(lineEdit, SIGNAL(textChanged(QString)),
wigglyWidget, SLOT(setText(QString)));
lineEdit->setText(tr("Hello world!"));
setWindowTitle(tr("Wiggly"));
resize(360, 145);
}
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) |
Торговые марки |
Qt 4.5.3 |
|