📄 mytest3dialogbase.cpp
字号:
/****************************************************************************** Form implementation generated from reading ui file '.\mytest3dialogbase.ui'**** Created: 星期一 十二月 29 18:09:53 2003** by: The User Interface Compiler ($Id: qt/main.cpp 3.1.2 edited Dec 19 11:45 $)**** WARNING! All changes made in this file will be lost!****************************************************************************/#include "mytest3dialogbase.h"#include <qvariant.h>#include <qlineedit.h>#include <qlistbox.h>#include <qpushbutton.h>#include <qlayout.h>#include <qtooltip.h>#include <qwhatsthis.h>#include "mytest3dialogbase.ui.h"/* * Constructs a MyTest3DialogBase as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */MyTest3DialogBase::MyTest3DialogBase( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ){ if ( !name ) setName( "MyTest3DialogBase" ); setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) ); setBackgroundOrigin( QDialog::WidgetOrigin ); setCursor( QCursor( 0 ) ); setSizeGripEnabled( TRUE ); GuessInput = new QLineEdit( this, "GuessInput" ); GuessInput->setGeometry( QRect( 190, 80, 80, 21 ) ); GuessInput->setMaxLength( 4 ); GuessInput->setAlignment( int( QLineEdit::AlignHCenter ) ); OutList = new QListBox( this, "OutList" ); OutList->setGeometry( QRect( 30, 20, 140, 240 ) ); OutList->setFocusPolicy( QListBox::NoFocus ); OutList->setFrameShape( QListBox::WinPanel ); GuessEnsure = new QPushButton( this, "GuessEnsure" ); GuessEnsure->setGeometry( QRect( 190, 120, 80, 31 ) ); GuessEnsure->setFocusPolicy( QPushButton::NoFocus ); languageChange(); resize( QSize(300, 285).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( GuessEnsure, SIGNAL( clicked() ), this, SLOT( GuessEnsure_clicked() ) );}/* * Destroys the object and frees any allocated resources */MyTest3DialogBase::~MyTest3DialogBase(){ // no need to delete child widgets, Qt does it all for us}/* * Sets the strings of the subwidgets using the current * language. */void MyTest3DialogBase::languageChange(){ setCaption( tr( "Guess QT version" ) ); OutList->clear(); //OutList->insertItem( tr( "New Item" ) ); GuessEnsure->setText( trUtf8( "确定(&O)" ) );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -