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

📄 mainwindow.cpp

📁 gx 公司的2410-ep qt试验源代吗。 还有说明文档。
💻 CPP
字号:
/****************************************************************************
** $Id: /sample/3/mainwindow.cpp   2.3.2   edited 2004-10-12 $
**
** Copyright (C) 2004-2005 OURSELEC AS.  All rights reserved.
**
** This file is part of an example program for Qt.  This example
** program may be used, distributed and modified without limitation.
**
*****************************************************************************/
#include "mainwindow.h"

MainWindow::MainWindow( QWidget *parent, const char *name):
		QWidget( parent, name )
{
	QFont f( "Helvetica", 14, QFont::Bold );
    	setFont( f );
	AddButton = new QPushButton( "Add", this );
	AddButton->setGeometry( 50, 15, 90, 40 );
	SubButton = new QPushButton( "Sub", this );
	SubButton->setGeometry( 50, 70, 90, 40 );

	counter = new Counter( this );
	counter->setGeometry( 50, 125, 90, 40 );

	QObject::connect( AddButton, SIGNAL( clicked() ),
			counter, SLOT( IncCounter() ) );
	QObject::connect( SubButton, SIGNAL( clicked() ),
			counter, SLOT( DecCounter() ) );
}

⌨️ 快捷键说明

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