Дневник
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("Windows-1251"));
Просмотров: 1269 |
Добавил: admin |
Дата: 13.10.2009
|
bool ok; QFont font = QFontDialog::getFont( &ok, QFont( "Arial", 18 ), this, tr("Pick a font") ); if( ok ) {
Просмотров: 1113 |
Добавил: qt-boy |
Дата: 21.06.2009
|
QColor color = QColorDialog::getColor( Qt::yellow, this ); if( color.isValid() ) {
Просмотров: 1962 |
Добавил: qt-boy |
Дата: 21.06.2009
|
bool ok; int value = QInputDialog::getInteger( this, tr("Integer"), tr("Enter an angle:"), 90, 0, 360, 1, &ok ); if( ok ) {
Просмотров: 1057 |
Добавил: qt-boy |
Дата: 21.06.2009
|
bool ok; QStringList items; items << tr("Foo") << tr("Bar") << tr("Baz"); QString item = QInputDialog::getItem( this, tr("Item"), tr("Pick an item:"), items, 0, false, &ok ); if( ok && !item.isEmpty() ) {
Просмотров: 2285 |
Добавил: qt-boy |
Дата: 21.06.2009
|
bool ok; QString text = QInputDialog::getText( this, tr("String"), tr("Enter a city name:"), QLineEdit::Normal, tr("Alingsas"), &ok ); if( ok && !text.isEmpty() ) {
Просмотров: 1827 |
Добавил: qt-boy |
Дата: 21.06.2009
|
• QMessageBox::Ok: OK • QMessageBox::Open: Open • QMessageBox::Save: Save • QMessageBox::Cancel: Cancel • QMessageBox::Close: Close • QMessageBox::Discard: Discard or don’t save, depending on the platform • QMessageBox::Apply: Apply • QMessageBox::Reset: Reset • QMessageBox::RestoreDefaults: Restore defaults • QMessageBox::Help : Help • QMessageBox::SaveAll: Save all • QMessageBox::Yes: Yes • QMessageBox::YesToAll: Yes to all • QMessageBox::No: No • QMessageBox::NoToAll: No to all • QMessageBox::Abort: Abort • QMessageBox::Retry: Retry • QMessageBox::Ignore: Ignore
Просмотров: 1481 |
Добавил: qt-boy |
Дата: 21.06.2009
|
switch( QMessageBox::question( this, tr("Application Name"), tr("An information message."), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::Cancel ) ) { case QMessageBox::Yes: ... break; case QMessageBox::No: ... break; case QMessageBox::Cancel: ... break; default: ... break; }
Просмотров: 1769 |
Добавил: qt-boy |
Дата: 21.06.2009
|
QMessageBox::
information (this,
tr("Application Name"), tr("An information message.") );
QMessageBox::warning (this, tr("Application Name"),
tr("A warning message.") );
QMessageBox::
critical (this,tr("Application Name"),
tr("A critical message.") );
Просмотров: 1062 |
Добавил: qt-boy |
Дата: 21.06.2009
|
QString filename = QFileDialog::getSaveFileName( this, tr("Save Document"), QDir::currentPath(), tr("Documents (*.doc)") );
Просмотров: 2165 |
Добавил: qt-boy |
Дата: 21.06.2009
|
Календарь « Апрель 2024 » Пн Вт Ср Чт Пт Сб Вс 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
Статистика
Онлайн всего: 1
Гостей: 1
Пользователей: 0