Qt: test! test!
来源:互联网 发布:js导出csv 编辑:程序博客网 时间:2024/06/07 06:04
1. my first QTprogram.cpp
#include <QApplication>
#include <QHBoxLayout>
#include <QSlider>
#include <QSpinBox>
int main(int argc, char *argv[])
{
}
2. hello.cpp
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
}
3. button.cpp
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
}
connect(sender , SIGNAL( signal())
sender , receiver: 指向QObject的指针
signal , slot: 函数名.
例子:connect(button , SIGNAL( clicked() ) , &app ,SLOT( quit() ) );
解释:当button按钮接收到点击信号就关闭app窗口.
- 一个信号可以连接多个槽.
- 多个信号可以连接同一个槽.
- 一个信号可以与另一个信号相连接.
- 连接可以被移除: disconnect(sender , SIGNAL() , receiver , SLOT());
(第四种情况会很少用.)
- Qt: test! test!
- test MarsEdit
- Kolmogorov-Smirnov test
- WDA TEST:Create navig…
- 测试BAPI ,执行test sequence
- Test Driven develop(TDD)
- 两个简单Swing test
- Multi Test Manager/MTM 工具下载
- [内核] A50X-JB-Kernel test-27
- [内核] A50X-JB-Kernel test-27
- [内核] A50X-JB-Kernel test-27
- [内核] A50X-JB-Kernel test-27
- [内核] A50X-JB-Kernel test-27
- poj 3249 Test for Job dp(动态规…
- Lesson 103 The French test 法语…
- Simple test to hide Information …
- Simple test to hide Information …
- Simple test to hide Information …
- POJ 2305 Out of Hay(Kruscal)
- Visual EmbedLinux Tools 0.2.5
- 计算机组成.人机转换大字典.几种字符编码
- 如何做好自己的工作
- 解决Warning:Ignoring InnerClasses attribute for an anonymous inner class associated EnclosingMethod at
- Qt: test! test!
- Qt:快速设计对话框. C++ GUI
- Qt:亲手写框体 C++ GUI (没课的…
- Linux:Qt的编译和安装配置 (本…
- Linux:proc文件系统
- 【LintCode】查找斐波那契数列中的N个数
- Linux:内核进程 (脑里面必有…
- Linux内存管理
- Bootloader and Uboot compiled, c…