摘要: 在QT中,有一个工具qmake可以生成一个makefile文件,它是由.pro文件生成而来的,.pro文件的写法如下:1. 注释从“#”开始,到这一行结束。2. 指定源文件SOURCES = *.cpp对于多源文件,可用空格分开,如:SOURCES = 1.cpp 2.cpp 3.cpp或者每一个文件可以被列在一个分开的行里面,通过反斜线另起一行,就像这样:SOURCES = hello.cpp \main.cpp一个更冗长的方法是单独地列出每一个文件,就像这样: SOURCES += hello.cppSOURCES += main.cpp这种方法中使用“+=”比“=”更安全,因为它只是向已 阅读全文
posted @ 2012-08-22 16:32 雨中枫叶 阅读(4702) 评论(0) 推荐(0) 编辑
摘要: 本以为终于等到一个对的人,却发现,似乎是自己多想了。如果,本就不可能,为什么要对我这么好,让我的心开始不平静呢! 阅读全文
posted @ 2012-07-04 23:18 雨中枫叶 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 生活中总会遇到各种各样的问题,但只要不断的寻找方法,终会解决。 阅读全文
posted @ 2012-06-26 20:56 雨中枫叶 阅读(105) 评论(0) 推荐(0) 编辑
摘要: main.cpp#include "settime.h"#include <QtCore/QCoreApplication>#include <QString>#include <sys/time.h>#include <unistd.h>#include <QDebug>int gettimeofday(struct timeval *tv, struct timezone *tz);int settimeofday(const struct timeval *tv, const struct timezone 阅读全文
posted @ 2012-05-13 17:07 雨中枫叶 阅读(454) 评论(0) 推荐(0) 编辑
摘要: linuxTime.h 1 #ifndef LinuxTime_H 2 #define LinuxTime_H 3 #include <QtCore/QCoreApplication> 4 5 class LinuxTime 6 { 7 public: 8 void setTime(int m_nhour,int m_nminute,int m_nsecond); 9 void setDate(int m_nyear,int m_nmonth,int m_nday);10 11 private:12 int m_nyear;13 int m_nmonth... 阅读全文
posted @ 2012-05-09 22:27 雨中枫叶 阅读(564) 评论(0) 推荐(0) 编辑
摘要: cmdcreatercmdcreater.pro1 SOURCES += \2 cmdcreator.cpp \3 main.cpp4 5 HEADERS += \6 cmdcreator.h \7 myplugininterface.hcmdcreater.h 1 #ifndef CMDCREATOR_H 2 #define CMDCREATOR_H 3 4 #include <QtGui/QWidget> 5 #include "myplugininterface.h" 6 7 class QComboBox; 8 class QLineEdit; 9 .. 阅读全文
posted @ 2012-04-25 13:13 雨中枫叶 阅读(713) 评论(0) 推荐(0) 编辑
摘要: rvolume.h中代码: 1 #ifndef VOLUME_H 2 #define VOLUME_H 3 #include <QtCore/QCoreApplication> 4 #include <QtSql> 5 #include <QTimer> 6 class RVolume : public QObject 7 { 8 Q_OBJECT 9 public: 10 RVolume(int);11 ~RVolume();12 private:13 char m_cBuff[256];14 char m_cNam... 阅读全文
posted @ 2012-04-09 15:00 雨中枫叶 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 前提linux系统下安装:sqlite 3.5.6insert.cpp 中代码:运行结果: 阅读全文
posted @ 2012-03-23 15:46 雨中枫叶 阅读(1100) 评论(0) 推荐(0) 编辑
摘要: C++序列化:hello.cpp 中代码: 1 #include <cppcms/json.h> 2 #include <iostream> 3 4 using namespace std; 5 6 class response { 7 public: 8 //0 is ok 9 //other values are wrong 10 int status; 11 string message; 12 }; 13 namespace cppcms { 14 namesp... 阅读全文
posted @ 2012-03-21 15:18 雨中枫叶 阅读(8451) 评论(0) 推荐(0) 编辑
摘要: 具体的方法是:在vm的network设置中,设置桥接(bridged),启动到CentOS后,可以在neat里直接双击eth0来配置IP、 mask、gateWay,也可以在/etc/sysconfig/network-scripts/ifcfg-eth0中配置(eth0为我使用的虚拟网卡,仅一个IP,不过我想需要看我写的东西的人估计设置也跟我一样),我的文件是这样的 # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth0 BOOTPROTO=none HWADDR=00:0C:29:CF:62:72 ONBOOT=y 阅读全文
posted @ 2012-03-13 12:48 雨中枫叶 阅读(732) 评论(0) 推荐(0) 编辑