|
How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
03/27/2012 1:13 AM
post92282
|
How to build a UI project in QtCreator like the demo Speedo or cEasy?
Hi, Dennis
I have downloaded your demo speedo and cEasy, I ran qmake_qnx and make from windows command line, the binary is built
successfully, while when I try to build other project in Qt examples, the project is not structured like your demo. I
copied all the .h .cpp and.pro to a folder and the make failed. I wonder what kind of project can be made by qmake_qnx
and make? What kind of project should I create in QtCreator? By the way if I want to migrate a web browser from Qt
platform to QNX, is it possible by your method?
Many thanks.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
03/27/2012 6:55 AM
post92285
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
>>> What kind of project should I create in QtCreator?
With the latest Qt Creator, I would start with QtQuick Project/QtQuick Application... "contains both QML and C++ code
and includes a QtDeclarative view."
This will give you a dummy QML file - where you put your script, and you can add additional C++ files for your "data"
handler (signals and slots). It will not have the "exact" structure of cEasy but should be a valid starting point for
a new app.
>>>r? By the way if I want to migrate a web browser from Qt
platform to QNX, is it possible by your method?
This would NOT likely be a Qt Quick project. But QNX qmake should still handle it.
Sorry, I have not tested qmqke_qnx.bat with anything but Qi Quick examples.
>>>I copied all the .h .cpp and.pro to a folder and the make failed.
Don't copy .pro - it needs to be built for qnx via qmake.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
03/27/2012 11:47 PM
post92308
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
Hi,Dennis
Thank you for your quick reply. I have another question.
>>>This will give you a dummy QML file - where you put your script, and >>>you can add additional C++ files for your "
data"
>>>handler (signals and slots). It will not have the "exact" structure of >>>cEasy but should be a valid starting
point for a new app.
I removed the folder "content" from my project folder, this folder contains .qml file and some images. The build is
still successful, the binary is the same. So, what's the function of qml if I can make the project without it?
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
03/28/2012 7:06 AM
post92312
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
The binary is indeed the same. The QML seems not to be processed in anyway during the build. In fact, "content" (the
arbitrary subdir location for this example) does not appear in the .pro file!
But it IS specified in the C++ sources...
File mainwidget.h:
const QString contentPath = "content/";
File mainwidget.cpp:
QString filename(contentPath + "easyQML.qml");
The content folder is used at RUNTIME since the "MainWidget" is subclassed to a QtDeclarativeView. This view (also
referred to as "Qt Quick") starts a runtime object which reads and displays the QML content/easyQML.qml - almost like a
browser starts index.html.
Since the QML specifies "Connections", a runtime linkage is established with the target instance "easyData" (in C++).
This linkage allows easyData to "emit" a signal recognized by QML and for QML to call a "slot" in easyData.
Note, if no "Connection" is specified, the QML willl still load and function - i.e. you can make a QML-only Qt program!
(However, for device control this is not very useful.)
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
03/28/2012 10:18 AM
post92322
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
>>>The content folder is used at RUNTIME
Does it mean I have to copy both the binary and content folder to my target when I want to run an application on the
target?
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
03/28/2012 11:01 PM
post92337
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
Absolutely! That is in the documentation for the examples.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
03/28/2012 1:24 AM
post92310
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
By the way,I opened some makefile in your demo and found "Generated by qmake (2.01a) (Qt 4.8.0)", while in my makefile
it is "Generated by qmake (2.01a) (Qt 4.7.1)", is there any difference? Do I have to update my qmake tool?
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
03/28/2012 7:08 AM
post92313
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
>>> (2.01a) (Qt 4.8.0)
The second version number is the version of the .so liibraries it expects to link to at runtime.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/11/2012 4:52 AM
post92519
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
Hi,Dennis
I have another problem. When I want to run the UI on my target, I found the following message:
# /fs/speedo -qws
Fatal: Cannot create Qt for Embedded Linux data directory: /qtembedded-0
Abort
What's the problem?
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/11/2012 7:03 AM
post92521
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
The solution is in this post:
http://community.qnx.com/sf/discussion/do/listPosts/projects.qt/discussion.general.topc20245
Basically you need to create a qnx4fs ramdisk mounted at /fs/ram and
export TMPDIR=/fs/ram
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/12/2012 2:51 AM
post92528
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
Hi, Dennis,
You mean I have to create another QNX4 file system on my SD card? I have already built a FAT32 system on my SD card by
the following command in buildfile:
devb-mmcsd-beagle dos exe=all lfn=show sfn=windows &
waitfor /dev/hd0 5 &
mount -t dos /dev/hd0t12 /fs
I can't create a qnx4 filesystem by using fdisk since the SD card is already occupied by FAT32 filesystem.
How can I mount a qnx4 filesystem on the SD card? In RAM?
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/12/2012 6:10 AM
post92531
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
#######################################################################
## create /ramdisk for qtembedded-0
#######################################################################
display_msg Starting filesystems...
# create 4M ramdisk /dev/hd1t77 for /qtembedded-0
# must 'dinit -h' and mount
devb-ram ram capacity=8192 &
waitfor /dev/hd1
dinit -hq /dev/hd1t77
mount /dev/hd1t77 /ramdisk
#######################################################################
## set Qt environment vars
#######################################################################
# Qt must make qtembbedded-0 in $TMPDIR
TMPDIR=/ramdisk
QWS_DISPLAY=qnx
QWS_KEYBOARD=qnx
QWS_MOUSE_PROTO=qnx
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/12/2012 4:11 AM
post92529
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
I have mounted a ramdisk and added TMPDIR variable, unfortunately the following message appeared :
# /tmp/speedo -qws
QWSServerSocket::init: Address family not supported by protocol family
Warning: QWSServerSocket: unable to create socket.
QWSServerPrivate::initServer: server socket not listening: No such process
Fatal: Failed to bind to /fs/ram/qtembedded-0/QtEmbedded-0
Always a lot of difficulties. I wonder if it is possible to embed Qt apps on TI Beagle board OMAP 3530.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/12/2012 6:13 AM
post92532
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
Sounds like it wants a network to be started. I guess I never built a runtime without a network present. Try starting
io-pkt-v4. On 3530 beagle, no interface is present, but maybe it will allow Qt to start.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/12/2012 10:52 PM
post92539
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
Hi,Dennis:
Thank you for your support. The Qt UI runs partly. It shows the following message:
# /fs/speedo/speedo -qws
Debug: QQnxScreen: Attached to Device, number of displays: 1
Debug: QQnxScreen: Attached to Display 0, resolution 720x400, refresh 60 Hz
Critical: QQnxMouseHandler: Unable to open mouse device (No such file or directory)
Critical: QWSQnxKeyboardHandler: Unable to open device (No such file or directory)
Warning: file:content/speedo.qml: File not found
Debug: program starting
I have already put the content file in the sd card, but it can't recognize it. Do I have to set other environment
variables?
Thank you very much.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/13/2012 9:15 AM
post92545
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
>>> # /fs/speedo/speedo -qws
export QWS_DISPLAY=qnx
export QWS_KEYBOARD=qnx
export QWS_MOUSE_PROTO=qnx
cd /fs/speedo
./speedo -qws
You must have started the following to attach to keyboard or mouse:
devi-hid -Pr kbd mouse
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/13/2012 11:31 AM
post92548
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
Hi,Dennis
Very happy that the application is running on Beagle board. I have connected mouse and keyboard and it works well. BTW,
I wonder if touchscreen control is possible for the Qt application?
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/13/2012 12:05 PM
post92549
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
Touchscreen is fully supported for Qt on the i.mx53 qsb w/lcd image posted on this forum.
You must have a driver loaded to use touch. For example for an hid-compliant usb touchscreen...
io-hid -d usb
devi-hid -Pr touch
For Qt, you would change the QWS_MOUSE_PROTO line to something like...
export QWS_MOUSE_PROTO=qnx:/dev/devi/touch0
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/15/2012 11:30 AM
post92550
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
Hi, Dennis:
Do you have any idea about egalax touch controller?
I can't make it work properly. I start the device by the following command:
io-hid -d egalax
devi-hid -Pr touch
With the QNX system driver devh-egalax, the X-Y axis are reversed and the touch point is not precise. Configuring calib
file seems useless, or I don't know how to configure calib file properly.
The driver shipped with the touchscreen is a RS232 serial driver which may not work for a USB touch controller interface
.
On the other hand, the QNX car application runs very well on this touchscreen, I wonder is there any way to let egalax
touch controller works properly?
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/15/2012 12:35 PM
post92551
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
One more question:
I have created a Hello World app in Qt QuickUI and compiled it. When I run it, I found that it requires the directory
QFontDatabase: /usr/photon/font_repository.
Can I redirect it to other path by setting ENVIRONMENT VAR? Because my photon directory has been shifted to my SD card.
Including them in image will lead to a very large image.
BTW it shows a message like following:
file:///fs/NewQt/qml/NewQt/main.qml:2:1: module "QtQuick" version 1.1 is not installed
import QtQuick 1.1
^
I opened your armv7-runtime-4.8.0 package, and I saw a Trolltech directory which contains a lot of font, how to use them
?
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/16/2012 2:18 AM
post92552
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
This problem has already been solved by myself by creating a symbolic link.
The Qt4.8 .so runs well.
Thank you all the same, Dennis.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/16/2012 7:21 AM
post92555
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
>>>file:///fs/NewQt/qml/NewQt/main.qml:2:1: module "QtQuick" version 1.1 is not installed
>>>import QtQuick 1.1
You must change this to "QtQuick 1.0" to resolve the error.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/16/2012 7:26 AM
post92556
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
>>>my photon directory has been shifted to my SD card.
Hint - mount the SDcard at "/". Then directories will appear at normal locations.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/19/2012 4:40 AM
post92630
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
Hi, Dennis
I am debugging a Qt application and I have met with a problem which might concerns the compile process of my application
.
The error message is like the following:
file:///fs/MMI/qml/Browser/BrowserView.qml:37:1: plugin cannot be loaded for module "QtWebK it": The plugin '/fs/MMI/
QtWebKit/libqmlwebkitplugin.so' uses incompatible Qt library. Expected build key "arm qws/qnx g++-4 no-pkg-config", got
"armv6 qws/qnx g++-4 full-config"
What kind of change should I make to make the build key as expected?
Thanks
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/19/2012 5:07 AM
post92633
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
The file libqmlwebkitplugin.so is from the qt_qnx_2011-02-24b.zip package. It is a Qt4.7 patch, on the other hand, the
Qtlib I used in my target is from armv7-runtime-4.8.0.zip Is this the reason that causes Qtlib incompatible issue? I
have to revert to 4.7lib or would it be possible that I get a 4.8 lib?
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/19/2012 5:55 PM
post92653
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
>>>would it be possible that I get a 4.8 lib?
I have packaged the armv7 version ofs libQtWebKit.so.4.9.0 and libqmlwebkitplugin.so in the following archive:
http://dl.dropbox.com/u/13676760/armv7-runtime2-4.8.0.zip
Note that libQtWebKit.so that is built from the repository identifies itself as "4.9.0" rather than "4.8.0" as the rest
of the libraries. You can try to rename it as libQtWebKit.so.4 if necessary.
Hope this helps.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/19/2012 11:01 PM
post92655
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
I have tried the new .so, the problem still exists. When I revert to the 4.7 .so, the browser seems to work, but the UI
runs very slowly and jpg decoding doesn't work. I really hope to use the 4.8 shared object.
I wonder if the libqmlwebkitplugin.so is built with the right build key since the error message is:
The plugin '/fs/MMI/QtWebKit
/libqmlwebkitplugin.so' uses incompatible Qt library. Expected build key "arm qws/qnx g++-4 no-pkg-config", got "armv6
qws/qnx g++-4 full-config"
I wonder if the libqmlwebkitplugin.so is built by you from source. I have no source file and I can't solve this problem.
I have downloaded QtWebKit 2.2 source from its Website. But I have no idea how to compile the webkit plugin as a QNX .
so file, I have no tool.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/20/2012 10:23 AM
post92672
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
>>>I have no source file and I can't solve this problem.
The same source is available to anyone. See
http://community.qnx.com/sf/discussion/do/listPosts/projects.qt/discussion.general.topc21351
I have been struggling with the webkit plugin as well. If I build a non-QML UI with a webView, I can display a page
(local or via socket) - BUT the image plugins (.jpg etc) just don't work. (This is on a system where jpeg's are
properly displayed QML scripts.)
If I build a QML version, I can't get past the line "import QtWebKit 1.0" - get "module "QtWebKit" is not installed".
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/21/2012 4:32 AM
post92684
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
For a QML version, you should copy the QtWebKit/libqmlwebkitplugin.so and QtWebKit/qmldir to your application directory,
and the Qtwebkit module uninstalled line can be passed.
For my QML version browser, I can load a local webpage. But when I load an Http webpage, for example http://www.google.
com, it failed.But, I can ping www.google.com in my target, which might means that my Internet connection is rightly
configured.
You have mentioned that you can load a URL page. What kind of net-related service should I start before starting the
Browser?
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/21/2012 8:08 AM
post92686
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
>>> I can ping www.google.com in my target, which might means that my Internet connection is rightly configured.
That should be sufficient for a browser to connect outward.
>>>What kind of net-related service should I start before starting the
Browser? -
Just io-pkt-c4. (inetd services are for others to connect inbound... not relevant to your browser.)
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/22/2012 6:00 AM
post92687
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
In fact, I can ping and load www.google.com by its IP address, say 74.125.71.99. But when I ping www.google.com or type
http://www.google.com in the URL input box, the page can't be loaded. It seems the domain name resolution has a problem.
I can't make sure the source of the problem lies in io-pkt v4 or elsewhere.
Do you have any idea?
BTW, the JPG picture still can't be loaded properly in 4.7 runtime components even if I have exported Qt_Plugin
ENVIRONMENT VAR.
There are also lot of square boxes instead of characters, do I have to add more font in the font directory?
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/22/2012 9:15 AM
post92689
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
I assume since your dns is not working, you are using a static IP address... otherwise dhcp would have provided the
gateway and dns server.
To setup dns for static ip...
Be sure to specify netmask on your ifconfig line as...
ifconfig fec0 10.0.2.201/24
Set gateway...
route add default 10.0.2.1
Setup dns (client) edit/create /etc/resolv.conf to contain
domain foobar
nameserver 8.8.8.8
Test by ping'ing by name. Once that works, the webkit plugin will resolve names.
Note 8.8.8.8 is a free google dns server - easy to remember!
I have succeeded in getting jpeg's from web to decode using the 4.7 components for x86 and armle-v7. (So far, I have
not gotten them to work using 4.8 components.)
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/23/2012 12:43 AM
post92690
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
That's interesting. Because when I use 4.8 component, which you give in http://community.qnx.com/sf/discussion/do/
listPosts/projects.qt/discussion.general.topc21389, the JPEG picture is loaded correctly. Could you give me your 4.7
components? I could try them on my target to see the results.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/23/2012 2:48 AM
post92691
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
The .jpg file in my apps can't be rendered either.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/23/2012 7:36 AM
post92695
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
>>>That's interesting. Because when I use 4.8 component, the JPEG picture is loaded correctly.
>>>The .jpg file in my apps can't be rendered either.
Huh?
>>>Could you give me your 4.7 components?
qt_qnx_2011-02-24b.zip from http://community.qnx.com/sf/frs/do/viewRelease/projects.qt/frs.binpkg.targets
One thing, to run jpegs, the file "Trolltech.conf" must be correct. This file is created on app startup if it does not
exist. This file is created in $HOME/Settings. If on your target, that location is not writeable, I am guessing
plugin's won't work. For an embedded system $HOME may be '/'. Is that writable on your target? Try deleting it and
see if it is recreated.
Of course, plugin libraries must be present in /usr/lib/qt4/plugins/imageformats as well.
Remember that .PNG images are handled without a plugin, so this can cause confusion.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/23/2012 12:43 PM
post92703
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
At the beginning, I didn't noticed Trolltech.conf file. Now both 4.7 and 4.8 can decode JPG pictures. The mistake I made
before is that I didn't replace image plugin 4.8 with 4.7 when I run 4.7, causing the jpeg failed in 4.7.
In addition, the new libqmlwebkitplugin.so you gave me might be the 4.7 edition, 'cause I noticed in my Trolltech.conf
that QtWebKit\libqmlwebkitplugin.so=40701, 0, armv6 qws/qnx g++-4 full-config, 2011-02-25.........
So, when I run web function, it shows an error concerning the build key. I wonder if you could send me a new one.
BTW, do you know something about International character support for Qt applications say Chinese or Japanese characters?
I am really gratitude for your help.
Many thanks
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
04/23/2012 1:03 PM
post92705
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
I know you guys know this already but Qt 4.81 is released and has a QNX port.
Qt 5.x (pre-release) is also available and has QNX integration with the new graphics framework that will be made
available in late June / July.
We are not posting either of these here as we want everyone to get them from the master qt repository.
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
10/01/2012 8:22 AM
post95944
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
I'm also busy with your demo application cEasy, in Qtcreator on desktop it works very well. Now I'm trying to run it on
a virtual machine which is running QNX. qmake_qnx is working fine and give me the objects files. When I run make after
the qmake_qnx command I get an error, it says that it can not find the -lpthread,, but if I look in my lib folder there
is no such lib as lpthread in it... maybe someone can help me solving my problem.
Thanks in advance,
Remco
|
|
|
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
|
10/01/2012 8:28 AM
post95945
|
Re: How to build a UI project in QtCreator like the demo Speedo or cEasy?
'pthread' is a Linux library. My guess is either you didn't build cEasy for QNX - or you are picking it up from the
wrong place.
|
|
|
|