天嵌 ARM开发社区

 找回密码
 注册
查看: 3298|回复: 8

仿真QT出错,求教!

[复制链接]
jlrq_gl 发表于 2010-7-8 14:17:30 | 显示全部楼层 |阅读模式
[root@localhost Qte]# ./test_x86
the root directory is already !
Using display 0
Warning: QSocket::writeBlock: Socket is not open
Warning: Need to run firstuse
Warning: language message - en_US
Warning: and its not null
Warning: loading /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/i18n
/en_US/qt.qm
Warning: loading /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/i18n
/en_US/qpe.qm
Warning: loading /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/i18n
/en_US/libqpe.qm
Warning: loading /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/i18n
/en_US/libqtopia.qm
Warning: loading /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/i18n
/en_US/language.qm
Warning: loading /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/i18n
/en_US/timezone.qm
Warning: loading /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/i18n
/en_US/systemtime.qm
Warning: Instructed to quit by Virtual Keyboard
不知道是什么意思?
亚瑟王 发表于 2010-7-9 18:36:17 | 显示全部楼层
显示器上面有什么显示?
回复

使用道具 举报

 楼主| jlrq_gl 发表于 2010-7-11 21:07:04 | 显示全部楼层
可以出现一个绿色的“welcome to Optioa”的界面,就是直接点界面的关闭按钮退出时就会出现上面的提示信息。
回复

使用道具 举报

亚瑟王 发表于 2010-7-12 11:40:56 | 显示全部楼层
然后qvfb里面还能使用吗?
回复

使用道具 举报

 楼主| jlrq_gl 发表于 2010-7-18 22:55:02 | 显示全部楼层
呵呵,前面问题解决了,其实是进入Welcome to Optioa界面后应该继续几步操作才会出现手册上的界面,我漏做了。谢谢了!
回复

使用道具 举报

 楼主| jlrq_gl 发表于 2010-7-18 22:56:44 | 显示全部楼层
但是,接下来编译的时候,又出错了,提示信息如下,不知何因:
[root@localhost first]# make
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/usr/lib/qt-3.1/include -I/include -o first.o first.cpp
first.cpp: In constructor `first::first(QWidget*, const char*, unsigned int)':
first.cpp:49: `PixmapLabel1' undeclared (first use this function)
first.cpp:49: (Each undeclared identifier is reported only once for each
   function it appears in.)
first.cpp:51: `image0' undeclared (first use this function)
make: *** [first.o] Error 1
回复

使用道具 举报

 楼主| jlrq_gl 发表于 2010-7-18 22:58:30 | 显示全部楼层
我的工程名为first,first.cpp文件内容与2010年6月版的first.cpp一样,具体程序行如下:
/****************************************************************************
** Form implementation generated from reading ui file 'first.ui'
**
** Created: Thu Jul 15 16:49:59 2010
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "first.h"

#include <qlabel.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

/*
*  Constructs a first which is a child of 'parent', with the
*  name 'name' and widget flags set to 'f'
*/
first::first( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
        setName( "first" );
    resize( 451, 305 );
    setCaption( tr( "EmbedSky_First_Qt_Program" ) );

    /*close = new QPushButton( this, "close" );
    close->setGeometry( QRect( 230, 160, 90, 32 ) );
    close->setText( tr( "Close" ) );*/

    user_b = new QPushButton( this, "user_b" );
    user_b->setGeometry( QRect( 60, 20, 100, 30 ) );
    user_b->setText( tr( "User Button" ) );

    user_t = new QLabel( this, "user_t" );
    user_t->setGeometry( QRect( 20, 70, 188, 30 ) );
    QFont user_t_font(  user_t->font() );
    /*user_t_font.setFamily( "adobe-helvetica" );*/
    user_t_font.setPointSize( 18 );
    user_t_font.setBold( TRUE );
    user_t->setFont( user_t_font );
    user_t->setText( tr( "" ) );

    PixmapLabel1=new QLabel(this,"PixmapLabel");
    PixmapLabel1->setGeometry(QRect(260,20,28,98));
    PixmapLabel1->setPixmap(image0);
    PixmapLabel1->setScaledContents(TRUE);

    close = new QPushButton( this, "close" );
    close->setGeometry( QRect( 120, 140, 80, 28 ) );
    close->setText( tr( "Close" ) );

    // signals and slots connections
    connect( user_b, SIGNAL( clicked() ), this, SLOT( user_button() ) );
    connect( close, SIGNAL( clicked() ), this, SLOT( close() ) );
}

/*  
*  Destroys the object and frees any allocated resources
*/
first::~first()
{
    // no need to delete child widgets, Qt does it all for us
}

/*  
*  Main event handler. Reimplemented to handle application
*  font changes
*/
bool first::event( QEvent* ev )
{
    bool ret = QWidget::event( ev );
    if ( ev->type() == QEvent::ApplicationFontChange ) {
        QFont user_t_font(  user_t->font() );
        /*user_t_font.setFamily( "adobe-helvetica" );*/
        user_t_font.setPointSize( 18 );
        user_t_font.setBold( TRUE );
        user_t->setFont( user_t_font );
    }
    return ret;
}

void first::user_button()
{
    user_t->setText(tr("Hello,Qt Application!"));
    //qWarning( "first::user_button(): Not implemented yet!" );
}
回复

使用道具 举报

 楼主| jlrq_gl 发表于 2010-7-18 23:00:17 | 显示全部楼层
急求救,谢谢!是在无Linux经验的基础上用嵌入式QT做一个系统的调试界面,时间紧迫,但进展很慢,心急如焚!
回复

使用道具 举报

亚瑟王 发表于 2010-8-2 16:11:47 | 显示全部楼层
把下面几行删掉后重新编译。
   PixmapLabel1=new QLabel(this,"PixmapLabel");
    PixmapLabel1->setGeometry(QRect(260,20,28,98));
    PixmapLabel1->setPixmap(image0);
    PixmapLabel1->setScaledContents(TRUE);
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2025-5-2 16:26 , Processed in 2.046218 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表