QTouchEvent Ubuntu 14.04 vs RHEL 7.4

时间:2017-10-24 05:31:22

标签: qt rhel

按下触摸屏显示器时,使用Qt4.8,00000000000000000a12syzygy.sv.example.co00000192.168.234.11900000000000Quasimodo 在安装了Ubuntu 14.04的PC上激发正确的信号(#include <string.h> #include <stdio.h> struct Field { int width; char pad; }; static struct Field fields[] = { { .width = 12, .pad = '0', }, { .width = 30, .pad = '@', }, { .width = 15, .pad = '.', }, { .width = 25, .pad = '-', }, }; enum { NUM_FIELDS = sizeof(fields) / sizeof(fields[0]) }; static char *data[][4] = { { "a12", "syzygy.sv.example.com", "192.168.234.119", "Quasimodo" }, { "zzx2341", "zulu.za.example.com", "192.168.23.19", "Beowulf" }, { "reynard", "coffee.br.example.com", "192.168.5.9", "William the Conqueror" }, { "peanut", "koala.au.example.com", "192.168.93.12", "Quasimodo" }, }; enum { NUM_ROWS = sizeof(data) / sizeof(data[0]) }; int main(void) { for (int i = 0; i < NUM_ROWS; i++) { char buffer[1024]; char *bufptr = buffer; size_t buflen = sizeof(buffer); for (int j = 0; j < NUM_FIELDS; j++) { int nbytes = snprintf(bufptr, buflen, "[%*.*s]", fields[j].width, fields[j].width, data[i][j]); if ((size_t)nbytes > buflen) { fprintf(stderr, "Overlength: %zu required\n", sizeof(buffer) - buflen + nbytes + 1); return 1; } size_t leading_blanks = strspn(bufptr + 1, " "); memset(bufptr + 1, fields[j].pad, leading_blanks); bufptr += nbytes; buflen -= nbytes; } printf("%s\n", buffer); } return 0; } [000000000a12][@@@@@@@@@syzygy.sv.example.com][192.168.234.119][----------------Quasimodo] [00000zzx2341][@@@@@@@@@@@zulu.za.example.com][..192.168.23.19][------------------Beowulf] [00000reynard][@@@@@@@@@coffee.br.example.com][....192.168.5.9][----William the Conqueror] [000000peanut][@@@@@@@@@@koala.au.example.com][..192.168.93.12][----------------Quasimodo] )。

对于在运行RHEL 7.4的PC上编译的完全相同的源代码,仅返回鼠标事件。

两台PC上的

dmesg lsusb 命令返回相同的结果,向我显示没有驱动程序问题。

为什么RHEL在这种情况下不会返回正确的信号?我希望在RHEL PC上使用多点触控。

0 个答案:

没有答案