首页| 论坛| 消息

标题:【共享】本人写的一个小程序!
作者:gongyh
日期:2005-09-15 17:49
内容:

本人写的一个小程序!初学者可以看看!
#ifndef NOTE_H
#define NOTE_H
#include
#include
#include
#include
#include
#include
#include
class note_book:public QWidget
{
Q_OBJECT
public:
note_book(QWidget *parent = 0);
public:
QPushButton *pushButton;
QPushButton *pushButton_2;
QTextEdit *textEdit;
public slots:
void save();
void dup_view();
};

#endif // NOTE_H

/////////////////////////////////////////////////////////////////
#include "note_book.h"
#include
#include
#include
#include
#include

note_book::note_book(QWidget *parent):QWidget(parent)
{
this->setEnabled(true);
//this->resize(QSize(220, 277).expandedTo(this->minimumSizeHint()));
//this->setGeometry(QRect(10, 250, 75, 23));
setMinimumSize(220,277);
setMaximumSize(220,277);
pushButton = new QPushButton(this);
pushButton->setObjectName(QString::fromUtf8("pushButton"));
pushButton->setGeometry(QRect(10, 250, 75, 23));
pushButton_2 = new QPushButton(this);
pushButton_2->setObjectName(QString::fromUtf8("pushButton_2"));
pushButton_2->setGeometry(QRect(136, 250, 75, 23));
textEdit = new QTextEdit(this);
textEdit->setObjectName(QString::fromUtf8("textEdit"));
textEdit->setGeometry(QRect(10, 10, 201, 221));
pushButton->setText(QApplication::translate("Form", "Ok"));
pushButton_2->setText(QApplicat ..


#1 [17521 09-17 10:21]
mingwm10.dll 找不到
#2 [XChinux 09-17 11:09]
把DevCpp/Bin目录设置到PATH里,或者把它拷贝到可执行目录的下边
#3 [ediwon 08-17 23:49]
void suggestion()// add this slot function
{
QMessageBox::warning(this, "Ok", "it was write");
}
//
QObject::connect(pushButton, SIGNAL(clicked()), this, SLOT(save()));
QObject::connect(pushButton, SIGNAL(clicked()), this, SLOT(suggestion())); //insert it

And like this, it will be perfect..
#4 [supfire 03-21 19:52]
关心的人还挺多。
#5 [cling 10-15 14:27]
支持一下!

<< 1 2 >> (1/2)

回复 发表
主题 版块