在PC电脑运行qvfb进行仿真时显示的是正弦波(用到sin函数),但重新编译后在SBC-2410运行时变成了三角波,并且只能看到原来波形的上半部(即波峰部分),下半部就看不到了,源代码都没有改变,这是怎么回事啊?
问题主要有两个: 1:在ButtonWindow例中 通过书中写的编译方式: g++ -o button ButtonWindow.cpp -I$qtDIR/include -L$qtDIR/lib -lqt 总是会有以下错误提示: /tmp/cc8kmfNl.o: In function `ButtonWindow::~ButtonWindow()': ButtonWindow.cpp:(.text+0x95): undefined reference to `vtable for ButtonWindow' ButtonWindow.cpp:(.text+0x9f): undefined reference to `vtable for ButtonWindow' /tmp/cc8...
graphics是这样改的,看看MIDP文档,注意边界和宽度的定义. /* * @(#)graphics.c 1.18 02/11/06 @(#) * * Copyright (c) 1999-2002 Sun Microsystems, Inc. All rights reserved. * PROPRIETARY/CONFIDENTIAL * Use is subject to license terms. */ #include #include #include #ifndef LINUX #error "----------------------------" #endif #if 0 #include "Qimage.h" typedef struct _mbs { QImage imag...
graphics是这样改的,看看MIDP文档,注意边界和宽度的定义. /* * @(#)graphics.c 1.18 02/11/06 @(#) * * Copyright (c) 1999-2002 Sun Microsystems, Inc. All rights reserved. * PROPRIETARY/CONFIDENTIAL * Use is subject to license terms. */ #include #include #include #ifndef LINUX #error "----------------------------" #endif #if 0 #include "Qimage.h" typedef struct _mbs { QImage imag...
我使用的是fedora9操作系统,自带的qt版本是4.3.4,KDEVELOP版本是3.5.1,KDE版本是3.5.9,按照书中第一个例子进行编写练习 首先,我修改了/etc/bashrc文件,加入export qtDIR=/usr/lib/qt4 export PATH=$qtDIR/bin: $PATH 然后source /etc/bashrc启用。 如果不使用kdevelop,用vim编写函数: #include <qtGui/QApplication> #include <qtGui/QWidget> #include <qtGui/QLabel> #include <qtCore/qtextCodec> #include <qtGui/QPus...
我编译的时候有以下错误,不知道是怎么回事?
它让加的两个头文件
摘自我的博客:http://xizhizhu.blogspot.com/2008/11/qt.html qt是TrollTech公司(现已被Nokia收购)开发的一个开源的跨平台的应用程序框架,支持Windows、Linux、Mac等多种平台(也即将推出对S60手机的支持),qt目前支持C++和Java两种语言进行开发,最新版本为4.4.3。qt的应用极为广泛,例如KDE桌面、KOffice办公套件、GoogleEarth等。qt包括开源和商业两个版本,开源版本的协议可以在这里查看。 在Linux桌面上安装qt 4.4.3需...
源程序如下: #include "head.h" TimeWindow :: TimeWindow() { char *buf = (char *)malloc(20); /** * 获取系统时间 **/ curtime = time(0); mytime = *localtime(&curtime); hour = mytime.tm_hour; min = mytime.tm_min; sec = mytime.tm_sec; setMinimumSize(200,100); setMaximumSize(200,100); ...
源程序如下: #include "head.h" TimeWindow :: TimeWindow() { char *buf = (char *)malloc(20); /** * 获取系统时间 **/ curtime = time(0); mytime = *localtime(&curtime); hour = mytime.tm_hour; min = mytime.tm_min; sec = mytime.tm_sec; setMinimumSize(200,100); setMaximumSize(200,100); setGeometry(200,200,200,100); sprintf(buf,"%.2d : %.2d : %.2d",hour,min,sec); //把系统时间写入buf...
源程序如下: #include "head.h" TimeWindow :: TimeWindow() { char *buf = (char *)malloc(20); /** * 获取系统时间 **/ curtime = time(0); mytime = *localtime(&curtime); hour = mytime.tm_hour; min = mytime.tm_min; sec = mytime.tm_sec; setMinimumSize(200,100); setMaximumSize(200,100); setGeometry(200,200,200,100); sprintf(buf,"%.2d : %.2d : %.2d",hour,min,sec); //把系统时间写入buf...