form1.cpp

来自「vod 项目软件源代码」· C++ 代码 · 共 76 行

CPP
76
字号
/****************************************************************************** Form implementation generated from reading ui file 'form1.ui'**** Created: 一 10月 9 18:19:29 2006**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)**** WARNING! All changes made in this file will be lost!****************************************************************************/#include <qvariant.h>#include <qlineedit.h>#include <qpushbutton.h>#include <qlistbox.h>#include <qlayout.h>#include <qtooltip.h>#include <qwhatsthis.h>#include <qimage.h>#include <qpixmap.h>#include "form1.h"#include "form1_func.h"/* *  Constructs a Form1 as a child of 'parent', with the *  name 'name' and widget flags set to 'f'. */Form1::Form1( QWidget* parent, const char* name, WFlags fl )    : QWidget( parent, name, fl ){    if ( !name )	setName( "Form1" );    lineEdit1 = new QLineEdit( this, "lineEdit1" );    lineEdit1->setGeometry( QRect( 10, 10, 220, 30 ) );    pushButton1 = new QPushButton( this, "pushButton1" );    pushButton1->setGeometry( QRect( 240, 10, 131, 30 ) );    listBox1 = new QListBox( this, "listBox1" );    listBox1->setGeometry( QRect( 10, 50, 360, 270 ) );    pushButton2 = new QPushButton( this, "pushButton2" );    pushButton2->setGeometry( QRect( 10, 330, 130, 31 ) );    pushButton3 = new QPushButton( this, "pushButton3" );    pushButton3->setGeometry( QRect( 230, 330, 141, 30 ) );    languageChange();    resize( QSize(380, 364).expandedTo(minimumSizeHint()) );    clearWState( WState_Polished );    // signals and slots connections    connect( pushButton1, SIGNAL( clicked() ), this, SLOT( onConnect() ) );    connect( pushButton3, SIGNAL( clicked() ), this, SLOT( close() ) );    connect( pushButton2, SIGNAL( clicked() ), this, SLOT( onPlay() ) );}/* *  Destroys the object and frees any allocated resources */Form1::~Form1(){    // no need to delete child widgets, Qt does it all for us}/* *  Sets the strings of the subwidgets using the current *  language. */void Form1::languageChange(){    setCaption( tr( "Form1" ) );    pushButton1->setText( tr( "connect" ) );    pushButton2->setText( tr( "play" ) );    pushButton3->setText( tr( "quit" ) );}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?