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

📄 colordialog.cpp

📁 一大堆的qt程序,在qte2.3.7下全部可以很好地运行
💻 CPP
字号:
#include "colordialog.h"ColorDialog::ColorDialog(QWidget *parent,const char *name, bool isModal)		:QDialog(parent,name,isModal){	redbutton = new QPushButton("red",this);	greenbutton = new QPushButton("green",this);	bluebutton = new QPushButton("blue",this);	whitebutton = new QPushButton("white",this);		connect(redbutton,SIGNAL(click()),SLOT(ChooseBackgroundColor()));	connect(greenbutton,SIGNAL(click()),SLOT(ChooseBackgroundColor()));	connect(bluebutton,SIGNAL(click()),SLOT(ChooseBackgroundColor()));	connect(whitebutton,SIGNAL(click()),SLOT(ChooseBackgroundColor()));}void ChooseBackgroundColor(){	if(redbutton->isDown())		col = red;	else if(greenbutton->isDown())	     {		    col = green;	     }	else if(bluebutton->isDown())	     {		    col = blue;	     }	else if(whitebutton->isDown())	     {		    col = white;	     }}void color(){	return col;}

⌨️ 快捷键说明

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