<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

  <channel>

  
  <title>Qt DevNet forums: Chinese 1312025633**  </title>
  <link>http://qt-project.org/forums/viewforum/39/</link>
  <description>RSS feed for latest posts in Chinese</description>
  <copyright>Copyright 2012 Qt Developer Network</copyright>
  <docs>http://www.rssboard.org/rss-specification</docs>
  <generator>ExpressionEngine v2.3.1 http://expressionengine.com/</generator>
  <lastBuildDate>Sat, 30 Jul 2011 13:33:53 GMT</lastBuildDate>
  <atom:link href="http://qt-project.org/feeds/all_forums/39" rel="self" type="application/rss+xml" />
  
  
  
        <item>
            <title>如何在Ubuntu的X&#45;window上跑QT？</title>
            <link>http://qt-project.org/forums/viewreply/85652</link>
            <author>Tobias Hunger</author>
            <description><![CDATA[Please see this post: http://qt&#45;project.org/forums/viewthread/17193]]></description>
            <guid isPermaLink="false">b526a19302064d57bbb22350b385928a</guid>
            <pubDate>Mon, 14 May 2012 13:20:35 GMT</pubDate>
        </item>
  
        <item>
            <title>如何在Ubuntu的X&#45;window上跑QT？</title>
            <link>http://qt-project.org/forums/viewthread/17190</link>
            <author>uniquez</author>
            <description><![CDATA[遇到一个棘手的问题，情况如下：

	有一块TI DM8148的开发板，我将UBuntu移植到了这快板子上面，同时还带有X&#45;window，现在这块板子上就像一台电脑一样跑UBuntu系统（接了显示器，鼠标，键盘）。

	接着我需要将QT库移植到这个上面去，使QT程序可以跑在这个UBuntu的桌面上。我将交叉编译好的QT程序和QT库下载到板子上，在终端上运行，程序能跑起来，有程序相关的打印，就是没有窗口的输出。请问问题是出在哪里？是否我在X&#45;window下跑QT程序一定需要QVFB的支持？

	我的环境：
编译服务器的系统：UBuntu 11.04
交叉编译链：linux&#45;arm&#45;gnueabi&#45;g++
开发板的系统：Ubuntu 11.04（带X&#45;window） 
QT库版本：4.8.1

	configure配置参数：
./configure &#45;prefix /usr/local/Trolltech/Qt&#45;4.8.1 &#45;arm &#45;xplatform qws/linux&#45;arm&#45;gnueabi&#45;g++ &#45;embedded arm &#45;little&#45;endian &#45;release &#45;opensource &#45;fast &#45;no&#45;accessibility &#45;scripttools &#45;svg &#45;webkit &#45;shared &#45;javascript&#45;jit &#45;qt&#45;sql&#45;sqlite &#45;no&#45;qt3support &#45;no&#45;mmx &#45;no&#45;3dnow &#45;no&#45;sse &#45;no&#45;sse2 &#45;silent &#45;qt&#45;libpng &#45;qt&#45;libjpeg &#45;qt&#45;libtiff &#45;make libs &#45;nomake examples &#45;nomake docs &#45;nomake demo &#45;no&#45;nis &#45;no&#45;cups &#45;no&#45;iconv &#45;no&#45;dbus &#45;qt&#45;freetype &#45;armfpa &#45;qt&#45;gfx&#45;linuxfb &#45;qt&#45;gfx&#45;transformed &#45;qt&#45;gfx&#45;multiscreen &#45;no&#45;gfx&#45;vnc &#45;no&#45;gfx&#45;qvfb &#45;qt&#45;kbd&#45;linuxinput &#45;qt&#45;mouse&#45;linuxinput &#45;no&#45;glib 

	板子的环境变量：
export QTDIR=/home/qt
export LD_LIBRARY_PATH=/lib/qt&#45;lib
export QT_QWS_FONTDIR=/lib/qt&#45;lib/fonts
export QWS_DISPLAY=&#8220;LinuxFb:/dev/fb0&#8221;]]></description>
            <guid isPermaLink="false">2b92fe9e54b6d6600f259b616c4d9aa4</guid>
            <pubDate>Mon, 14 May 2012 08:53:37 GMT</pubDate>
        </item>
  
        <item>
            <title>有人对向Qt Labs China投稿感兴趣么？</title>
            <link>http://qt-project.org/forums/viewthread/17128</link>
            <author>Liang Qi</author>
            <description><![CDATA[详情见 http://labs.qt.nokia.com.cn/get&#45;involved/]]></description>
            <guid isPermaLink="false">6c2324ee0316e85babb4f1bd4e253247</guid>
            <pubDate>Fri, 11 May 2012 09:14:29 GMT</pubDate>
        </item>
  
        <item>
            <title>“定制QML扩展插件”载入失败？求指教</title>
            <link>http://qt-project.org/forums/viewreply/85011</link>
            <author>Charles</author>
            <description><![CDATA[都叫Charles没什么, 都叫Charles Yin, 那就不能不来认认亲了 :)

	debug版本的问题你自己已经发现了， 第二个问题，对于qtcreator来说， 要让它识别非内置的plugin中的qml类型， 你需要qmldump这个工具:
 http://doc.qt.nokia.com/qtcreator&#45;2.3/creator&#45;qml&#45;modules&#45;with&#45;plugins.html]]></description>
            <guid isPermaLink="false">4453da708b8c9a4e3124db7bd511b85b</guid>
            <pubDate>Tue, 08 May 2012 13:57:45 GMT</pubDate>
        </item>
  
        <item>
            <title>QT程序运行死机，需要显卡的DRI，DRM功能支持吗</title>
            <link>http://qt-project.org/forums/viewthread/17006</link>
            <author>exqtr</author>
            <description><![CDATA[我把QT程序移植到了kunlun linux(一个比较小的linux发行版)上，移植是成功了，但是一运行QT程序，Xorg的CPU占用率就到百分之百。看了一下系统的Xorg.0.log日志，DRI禁止了。原因是/dev/dri/card0文件不存在。
    我的问题是,QT程序需要得到DRI支持吗]]></description>
            <guid isPermaLink="false">1837a18e320fa497f6c32cab9d953edd</guid>
            <pubDate>Tue, 08 May 2012 05:02:28 GMT</pubDate>
        </item>
  
        <item>
            <title>“定制QML扩展插件”载入失败？求指教</title>
            <link>http://qt-project.org/forums/viewthread/16941</link>
            <author>charles_yin</author>
            <description><![CDATA[我最近安装了Qt SDK 1.2.1 for windows，然后新建了一个定制QML扩展插件，把项目名，对象类名和URI都设为同一个名字，例如&#8220;Charles&#8220;。我用release方式生成，将生成的Charles.dll以及qmldir文件放在一个QtQuick UI项目下面，import进去，运行失败，出现如下输出：
Qml debugging is enabled. Only use this in a safe environment!
file:///E:/Desktop/QT/UI/UI.qml:4:1: plugin cannot be loaded for module &amp;quot;&amp;quot;: The plugin &apos;E:/Desktop/QT/UI/Charles.dll&apos; uses incompatible Qt library. Expected build key &amp;quot;Windows mingw debug full&#45;config&amp;quot;, got &amp;quot;Windows mingw release full&#45;config&amp;quot; 
&amp;nbsp; &amp;nbsp; &amp;nbsp;import &amp;quot;./&amp;quot; 


	qml file&#40;UI.qml&#41;:
import QtQuick 1.1
import &amp;quot;./&amp;quot;
Rectangle &#123;
&amp;nbsp; &amp;nbsp; width: 360
&amp;nbsp; &amp;nbsp; height: 360
&amp;nbsp; &amp;nbsp; Charles&#123;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; id:logic
&amp;nbsp; &amp;nbsp; &#125;
&#125;


	看来qmlviewer已经发现这插件，但是没法载入。
后来我用debug方式生成了Charlesd.dll把它(以及对应的qmldir)放到UI项目里，这次qmlviewer能正常运行了，但是QtCreator的编辑器里面，qml文件里的Charles下面有红色波浪线，显示‘未知类型’。
难道编辑器只识别release生成的插件而qmlviewer识别debug生成的插件？有点小晕。。

	ps.我把creator调用的那个qmlviewer拷贝出来，发现它依赖的是QtCored4.dll这种后面带‘d’的，那这个qmlviewer是不是debug方式生成的啊？

	我已经纠结这个问题几天了，不知各位有没有什么好法子，先谢谢了~]]></description>
            <guid isPermaLink="false">843819fae0d3756a5ca2ffd441ae6b44</guid>
            <pubDate>Sat, 05 May 2012 05:12:37 GMT</pubDate>
        </item>
  
        <item>
            <title>[Solved] 对《C++ GUI Programming with Qt 4 (2nd Edition)》书上例子的疑惑</title>
            <link>http://qt-project.org/forums/viewreply/84568</link>
            <author>nimingzhe2008</author>
            <description><![CDATA[谢谢。]]></description>
            <guid isPermaLink="false">5c06eb7198c341bb8833c8b84e66bb6e</guid>
            <pubDate>Thu, 03 May 2012 14:30:24 GMT</pubDate>
        </item>
  
        <item>
            <title>[Solved] 对《C++ GUI Programming with Qt 4 (2nd Edition)》书上例子的疑惑</title>
            <link>http://qt-project.org/forums/viewthread/16760</link>
            <author>nimingzhe2008</author>
            <description><![CDATA[在这本书的第二章，给了一个例子
头文件finddialog.h
#ifndef FINDDIALOG_H
#define FINDDIALOG_H
&amp;nbsp;
#include &amp;lt;QDialog&amp;gt;
&amp;nbsp;
class QCheckBox;
class QLabel;
class QLineEdit;
class QPushButton;
&amp;nbsp;
class FindDialog : public QDialog
&#123;
&amp;nbsp; &amp;nbsp; Q_OBJECT
&amp;nbsp;
public:
&amp;nbsp; &amp;nbsp; FindDialog&#40;QWidget *parent = 0&#41;;
&amp;nbsp;
signals:
&amp;nbsp; &amp;nbsp; void findNext&#40;const QString &amp;amp;str, Qt::CaseSensitivity cs&#41;;
&amp;nbsp; &amp;nbsp; void findPrevious&#40;const QString &amp;amp;str, Qt::CaseSensitivity cs&#41;;
&amp;nbsp;
private slots:
&amp;nbsp; &amp;nbsp; void findClicked&#40;&#41;;
&amp;nbsp; &amp;nbsp; void enableFindButton&#40;const QString &amp;amp;text&#41;;
&amp;nbsp;
private:
&amp;nbsp; &amp;nbsp; QLabel *label;
&amp;nbsp; &amp;nbsp; QLineEdit *lineEdit;
&amp;nbsp; &amp;nbsp; QCheckBox *caseCheckBox;
&amp;nbsp; &amp;nbsp; QCheckBox *backwardCheckBox;
&amp;nbsp; &amp;nbsp; QPushButton *findButton;
&amp;nbsp; &amp;nbsp; QPushButton *closeButton;
&#125;;
&amp;nbsp;
#endif

finddialog.cpp的部分代码
#include &amp;lt;QtGui&amp;gt;
&amp;nbsp;
#include &amp;quot;finddialog.h&amp;quot;
&amp;nbsp;
FindDialog::FindDialog&#40;QWidget *parent&#41;//疑问一：parent由始至终没有使用
&amp;nbsp; &amp;nbsp; : QDialog&#40;parent&#41;
&#123;
&amp;nbsp; &amp;nbsp; label = new QLabel&#40;tr&#40;&amp;quot;Find &amp;amp;what:&amp;quot;&#41;&#41;;
&amp;nbsp; &amp;nbsp; lineEdit = new QLineEdit;
&amp;nbsp; &amp;nbsp; label&#45;&amp;gt;setBuddy&#40;lineEdit&#41;;
&amp;nbsp;
&amp;nbsp; &amp;nbsp; caseCheckBox = new QCheckBox&#40;tr&#40;&amp;quot;Match &amp;amp;case&amp;quot;&#41;&#41;;
&amp;nbsp; &amp;nbsp; backwardCheckBox = new QCheckBox&#40;tr&#40;&amp;quot;Search &amp;amp;backward&amp;quot;&#41;&#41;;
&amp;nbsp;
&amp;nbsp; &amp;nbsp; findButton = new QPushButton&#40;tr&#40;&amp;quot;&amp;amp;Find&amp;quot;&#41;&#41;;
&amp;nbsp; &amp;nbsp; findButton&#45;&amp;gt;setDefault&#40;true&#41;;
&amp;nbsp; &amp;nbsp; findButton&#45;&amp;gt;setEnabled&#40;false&#41;;
&amp;nbsp;
&amp;nbsp; &amp;nbsp; closeButton = new QPushButton&#40;tr&#40;&amp;quot;Close&amp;quot;&#41;&#41;;
&amp;nbsp;
&amp;nbsp; &amp;nbsp; connect&#40;lineEdit, SIGNAL&#40;textChanged&#40;const QString &amp;amp;&#41;&#41;,
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this, SLOT&#40;enableFindButton&#40;const QString &amp;amp;&#41;&#41;&#41;;
&amp;nbsp; &amp;nbsp; connect&#40;findButton, SIGNAL&#40;clicked&#40;&#41;&#41;,
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this, SLOT&#40;findClicked&#40;&#41;&#41;&#41;;
&amp;nbsp; &amp;nbsp; connect&#40;closeButton, SIGNAL&#40;clicked&#40;&#41;&#41;,
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this, SLOT&#40;close&#40;&#41;&#41;&#41;;
&amp;nbsp;
&amp;nbsp; &amp;nbsp; QHBoxLayout *topLeftLayout = new QHBoxLayout;
&amp;nbsp; &amp;nbsp; topLeftLayout&#45;&amp;gt;addWidget&#40;label&#41;;
&amp;nbsp; &amp;nbsp; topLeftLayout&#45;&amp;gt;addWidget&#40;lineEdit&#41;;
&amp;nbsp;
&amp;nbsp; &amp;nbsp; QVBoxLayout *leftLayout = new QVBoxLayout;
&amp;nbsp; &amp;nbsp; leftLayout&#45;&amp;gt;addLayout&#40;topLeftLayout&#41;;
&amp;nbsp; &amp;nbsp; leftLayout&#45;&amp;gt;addWidget&#40;caseCheckBox&#41;;
&amp;nbsp; &amp;nbsp; leftLayout&#45;&amp;gt;addWidget&#40;backwardCheckBox&#41;;
&amp;nbsp;
&amp;nbsp; &amp;nbsp; QVBoxLayout *rightLayout = new QVBoxLayout;
&amp;nbsp; &amp;nbsp; rightLayout&#45;&amp;gt;addWidget&#40;findButton&#41;;
&amp;nbsp; &amp;nbsp; rightLayout&#45;&amp;gt;addWidget&#40;closeButton&#41;;
&amp;nbsp; &amp;nbsp; rightLayout&#45;&amp;gt;addStretch&#40;&#41;;
&amp;nbsp;
&amp;nbsp; &amp;nbsp; QHBoxLayout *mainLayout = new QHBoxLayout;
&amp;nbsp; &amp;nbsp; mainLayout&#45;&amp;gt;addLayout&#40;leftLayout&#41;;
&amp;nbsp; &amp;nbsp; mainLayout&#45;&amp;gt;addLayout&#40;rightLayout&#41;;
&amp;nbsp; &amp;nbsp; setLayout&#40;mainLayout&#41;;//疑问2：为什么不是“对象.setLayout(mainLayout);”的形式
&amp;nbsp;
&amp;nbsp; &amp;nbsp; setWindowTitle&#40;tr&#40;&amp;quot;Find&amp;quot;&#41;&#41;;//疑问同上
&amp;nbsp; &amp;nbsp; setFixedHeight&#40;sizeHint&#40;&#41;.height&#40;&#41;&#41;;//疑问同上
&#125;]]></description>
            <guid isPermaLink="false">554636c1b93cdf9baf04bca9b8f500f4</guid>
            <pubDate>Sun, 29 Apr 2012 16:48:51 GMT</pubDate>
        </item>
  
        <item>
            <title>编译qt4.8.1遇到错误</title>
            <link>http://qt-project.org/forums/viewreply/82722</link>
            <author>XLeopard</author>
            <description><![CDATA[在哪结束自己的帖子]]></description>
            <guid isPermaLink="false">20883ee9f7150952fcbded9b2ea18c10</guid>
            <pubDate>Wed, 18 Apr 2012 15:20:56 GMT</pubDate>
        </item>
  
        <item>
            <title>编译qt4.8.1遇到错误</title>
            <link>http://qt-project.org/forums/viewthread/16201</link>
            <author>qtzzh</author>
            <description><![CDATA[我的系统是win 7 sp1 64 位家庭高级版，安装的是vc++ 2010 sp1学习版，也安装perl了，PATH也设定了。configure &#45;release &#45;qt&#45;zlib &#45;qt&#45;sql&#45;sqlite &#45;platform win32&#45;msvc2010通过，然后nmake的时候，进行了大概15分钟后，就出现了错误。
————————————————————————————————————————————
ThreadGlobalData.cpp
D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\yvals.h(21) : war
ning C4005: “_HAS_TR1”: 宏重定义 命令行参数: 参见前面的“_HAS_TR1”定义
ThreadTimers.cpp
D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\yvals.h(21) : war
ning C4005: “_HAS_TR1”: 宏重定义 命令行参数: 参见前面的“_HAS_TR1”定义
Timer.cpp
D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\yvals.h(21) : war
ning C4005: “_HAS_TR1”: 宏重定义 命令行参数: 参见前面的“_HAS_TR1”定义
UUID.cpp
D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\yvals.h(21) : war
ning C4005: “_HAS_TR1”: 宏重定义 命令行参数: 参见前面的“_HAS_TR1”定义
Widget.cpp
D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\yvals.h(21) : war
ning C4005: “_HAS_TR1”: 宏重定义 命令行参数: 参见前面的“_HAS_TR1”定义
PlatformStrategies.cpp
D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\yvals.h(21) : war
ning C4005: “_HAS_TR1”: 宏重定义 命令行参数: 参见前面的“_HAS_TR1”定义
LocalizedStrings.cpp
Cursor.cpp
D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\yvals.h(21) : war
ning C4005: “_HAS_TR1”: 宏重定义 命令行参数: 参见前面的“_HAS_TR1”定义
D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\yvals.h(21) : war
ning C4005: “_HAS_TR1”: 宏重定义 命令行参数: 参见前面的“_HAS_TR1”定义
NMAKE : fatal error U1077: ““D:\Program Files (x86)\Microsoft Visual Studio 10.
0\VC\BIN\cl.EXE“”: 返回代码“0×2”
Stop.
NMAKE : fatal error U1077: ““D:\Program Files (x86)\Microsoft Visual Studio 10.
0\VC\BIN\nmake.exe“”: 返回代码“0×2”
Stop.
NMAKE : fatal error U1077: “cd”: 返回代码“0×2”
Stop.
NMAKE : fatal error U1077: “cd”: 返回代码“0×2”
Stop.]]></description>
            <guid isPermaLink="false">51320e68f1116491be1635106f2a6f0b</guid>
            <pubDate>Mon, 09 Apr 2012 13:49:56 GMT</pubDate>
        </item>
  

  </channel>
</rss>
