首页| 论坛| 消息

标题:请问大侠们——关于触摸屏问题
作者:wgzymzx
日期:2006-07-27 21:25
内容:

这个源程序,应该如何修改或编译才能让其支持触摸屏——点击按钮后能响应按钮的点击动作,
触摸屏已经校正过,而且非常准确。
#include
#include
#include
#include
#include
#include
#include
#include
/*
#define QWS_MOUSE_IPAQ
#define QWS_MOUSE_IPAQ_RAW
#define QWS_MOUSE_PROTO="TPanel:/dev/h3600_tsraw"
*/
class MyMainWindow :public QWidget
{
public:
MyMainWindow(QWidget *parent=0, const char *name=0);
~MyMainWindow();
private:
QPushButton *b1;
};
MyMainWindow::~MyMainWindow()
{
}
MyMainWindow::MyMainWindow(QWidget *parent, const char *name)
{
char *string = "中文和English混和字符串!";
printf("mywindow:in\n");
QTextCodec *gbk_codec = QTextCodec::codecForName("GBK");
QString gbk_string = gbk_codec->toUnicode("查询");
QLabel *label = new QLabel(this);
label->setGeometry(0, 0, 800, 600);
label->show();
QPushButton *btn_custom = new QPushButton( this,"btn_custom" );
btn_custom->setGeometry( 200, 200, 100, 50 );
btn_custom->setText(gbk_string);
btn_custom->show();

}
int main(int argc , char **argv)
{
printf("Project Main:in\n");
QApplication app(argc, argv);
QFont font1("st_hwkt",24,50,FALSE);
qApp->setFont(font1);
MyMainWindow *windowmain = new MyMainWindow(0, "Main") ;
app.setMainWidget(windowmain);
windowmain->showFullScreen();
printf("==============\n");
return app.exec();
}


#1 [wgzymzx 07-29 00:57]
怎么只有人看,却没人提出解决方案呀
#2 [kevinlynx 08-21 11:37]
问的人多,回答的人少,不知道是知道的人吝啬经验的泄露,还是真不知道。
搭车同问一下。
#3 [fengshenx 08-22 19:48]
触摸屏和具体的程序没有关系。
需要在移植qte库的时候修改。
有关触摸屏的问题,多在版上搜索一下,会有所收获。

回复 发表
主题 版块