⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form2.cpp

📁 这是一个嵌入式linux的GUI源码comdemo.tar.gz 一个QT/Embedded 的控件功能演示源码
💻 CPP
字号:
/****************************************************************************** Form implementation generated from reading ui file 'demo2.ui'**** Created: Sat Jun 26 17:31:21 2004**      by:  The User Interface Compiler (uic)**** WARNING! All changes made in this file will be lost!****************************************************************************/#include "form2.h"#include "form1.h"#include "form3.h"#include <qlistbox.h>#include <qmultilineedit.h>#include <qpushbutton.h>#include <qlayout.h>#include <qvariant.h>#include <qtooltip.h>#include <qwhatsthis.h>/*  *  Constructs a Form2 which is a child of 'parent', with the  *  name 'name' and widget flags set to 'f'  */Form2::Form2( QWidget* parent,  const char* name, WFlags fl )    : QWidget( parent, name, fl ){    if ( !name )	setName( "Form2" );    resize( 240, 320 );     setMaximumSize( QSize( 240, 320 ) );    setCaption( tr( "Form2" ) );    ListBox1 = new QListBox( this, "ListBox1" );    ListBox1->insertItem( tr( "New Item" ) );    ListBox1->setGeometry( QRect( 10, 10, 210, 120 ) );     MultiLineEdit1 = new QMultiLineEdit( this, "MultiLineEdit1" );    MultiLineEdit1->setGeometry( QRect( 10, 137, 211, 121 ) );     PushButton6 = new QPushButton( this, "PushButton6" );    PushButton6->setGeometry( QRect( 134, 272, 80, 30 ) );     PushButton6->setText( tr( "Next >>" ) );    PushButton6_2 = new QPushButton( this, "PushButton6_2" );    PushButton6_2->setGeometry( QRect( 30, 273, 80, 30 ) );     PushButton6_2->setText( tr( "<< Prior" ) );    m_fm1 = 0;    m_fm3 = 0;   connect( PushButton6, SIGNAL(clicked()), this, SLOT(shownext()) );   connect( PushButton6_2, SIGNAL(clicked()), this, SLOT(showlast()) );   MultiLineEdit1->setText("this is a Multi-Line Editor;\nPlease input some words here!");   ListBox1->insertItem("Item1");   ListBox1->insertItem("Item2");   ListBox1->insertItem("Item3");}/*   *  Destroys the object and frees any allocated resources */Form2::~Form2(){    // no need to delete child widgets, Qt does it all for us}void Form2::setFormPtr(Form1* fm1, Form3* fm3){	m_fm1 = fm1;	m_fm3 = fm3;}void Form2::shownext(){if (m_fm3){	hide();	m_fm3->show();}}void Form2::showlast(){if (m_fm1){	hide();	m_fm1->show();}}

⌨️ 快捷键说明

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