1、打开开发工具:
[redsir@localhost mypvb-demo]$ sudo pvdevelop
2、新建工程:
File -> New pvserver ->选择文件夹 -> OK.
3、添加组件。空白处右键:Add widget
4、Action -> Editor -> slot -> ButtonEvent :
static int slotButtonEvent(PARAM *p, int id, DATA *d)
{
if(p == NULL || id == 0 || d == NULL) return -1;
if(id == obj1) pvPrintf(p, obj1, "World");
return 0;
}
5、编译运行:
#qmake mypro.pro
#qmake
#make
#./mypro