Changeset 341


Ignore:
Timestamp:
Nov 23, 2009, 7:52:20 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

tests/widget: Added codecs test.

Location:
tests/widget
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tests/widget/widget.cpp

    r311 r341  
    278278#endif
    279279
    280 #if 1
     280#if 0
    281281        QMenuBar *mb = new QMenuBar(this);
    282282
     
    455455int main(int argc, char **argv)
    456456{
     457#if 1
     458    ////////////////////////////////////////////////////////////////////////////
     459    // Text mode
     460
     461    QCoreApplication app(argc, argv);
     462
     463    qWarning() << "Available codecs :\n" << QTextCodec::availableCodecs();
     464    qWarning() << "";
     465    qWarning() << "Codec for locale :" << QTextCodec::codecForLocale()->name();
     466    qWarning() << "         Aliases :" << QTextCodec::codecForLocale()->aliases();
     467    qWarning() << "";
     468    qWarning() << "Library paths    :" << QApplication::libraryPaths();
     469
     470#else
     471    ////////////////////////////////////////////////////////////////////////////
     472    // GUI
     473
    457474    QApplication app(argc, argv);
    458475
     476    QRect r = QApplication::desktop()->availableGeometry();
    459477    MyWidget widget;
    460478    widget.resize(100, 100);
    461     widget.move(1280-168, 1024-200);
     479    widget.move(r.width() - 200, r.height() - 200);
    462480
    463481    widget.show();
     
    510528
    511529    return app.exec();
     530#endif
    512531}
    513532
  • TabularUnified tests/widget/widget.pro

    r311 r341  
    11QT = core gui
     2CONFIG += console
    23
    34SOURCES += widget.cpp
Note: See TracChangeset for help on using the changeset viewer.