摘要: #include #include using namespace std; class SignalExample { static SignalExample* c_instance; //将所有的构造函数(构造函数、拷贝构造、赋值重载)都私有化,使外部不能直接创建对象 SignalExample() { } SignalExample(); Sig... 阅读全文
posted @ 2017-04-15 17:00 sunxiaolongblog 阅读(141) 评论(0) 推荐(0) 编辑
摘要: #include void Sample_1() { QString s = "add"; s.append(" "); // "add " 在后面追加 s.append("Qt"); // "add Qt" s.prepend(" "); // " add Qt"在前面追加 s.prepend("C++... 阅读全文
posted @ 2017-04-15 16:53 sunxiaolongblog 阅读(1032) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-04-15 16:37 sunxiaolongblog 阅读(427) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include "MainWindow.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); Widget w; QPushButton b(&w); // 生成 QPushButton对象, 其父组件为... 阅读全文
posted @ 2017-04-15 16:31 sunxiaolongblog 阅读(704) 评论(0) 推荐(0) 编辑