QString QFileDialog::getOpenFileName ( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(), const QString & filter = QString(), QString * selectedFilter = 0, Options options = 0 ) [static]
QFile, QTextStream, void QLabel::setText( const QString& text )
TRPO::TRPO(QWidget *parent) : QWidget(parent){ QTextCodec::setCodecForCStrings(QTextCodec::codecForName("Windows-1251")); QPushButton *b_open = new QPushButton ("Открыть..."); QPushButton *b_rachet = new QPushButton ("Рассчитать"); QPushButton *close_wid = new QPushButton ("Закрыть"); QHBoxLayout* phbxLayout = new QHBoxLayout; phbxLayout->setMargin(10); phbxLayout->setSpacing(20); phbxLayout->addWidget(b_open,0,Qt::AlignBottom); phbxLayout->addWidget(b_rachet,0,Qt::AlignBottom); phbxLayout->addWidget(close_wid,0,Qt::AlignBottom); setLayout(phbxLayout); connect(close_wid, SIGNAL(clicked ()), SLOT(quit()));}
connect(close_wid, SIGNAL(clicked ()), app, SLOT(quit()));
#include <QtGui/QApplication>#include "trpo.h"#include <QPushButton>int main(int argc, char *argv[]){ QApplication app(argc, argv); TRPO w; w.setWindowFlags(Qt::Window|Qt::WindowMinimizeButtonHint); w.setWindowTitle("Tiles"); w.resize(800,400); w.show(); return app.exec();}
pvbxLayout->addLayout(phbxLayout);