Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
wiki5134: DevSetup (Version 7)

Qt development environment setup#

Qt Support Disclaimer#

QNX Software Systems (QSS) is pleased to see Qt ported to the QNX Neutrino RTOS. The Qt distribution is posted on Foundry27 as a convenience for our customer base until such time that it is officially posted on the Nokia Qt website. As Qt is not supported directly by QSS, you are encouraged to contact one of the many organizations that provide Qt related services should you require training, consulting or support for Qt.

Installing target binaries on the host system#

Download the binary package for all targets from the Downloads page, and follow the instructions in the readme file.

A debug symbol package is available from the same page, and may be useful when debugging Qt applications. To untar it, see the readme file from the above "all targets" package and follow the instructions in the "Installing target binaries" section.

Target system setup#

The "all targets" package provides target setup instructions in its readme file.

Developing Qt applications#

Building and running programs#

The "all targets" package provides build instructions in its readme file.

Debugging#

The debug symbol archive should be installed on your host system before you run GDB.

Connecting via qconn#

Once a Qt application is running, you can attach to it with GDB via qconn; run "target qnx IP_ADDRESS:8000" and "attach PID".

Sample debug log#

$ ntox86-gdb ./qt-hello
GNU gdb 6.8 qnx-nto (rev. 506)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=i486-pc-nto-qnx6.5.0"...
(no debugging symbols found)
(gdb) target qnx 198.51.100.42:8000
Remote debugging using 198.51.100.42:8000
MsgNak received - resending
Remote target is little-endian
(gdb) attach 786450
Attaching to pid 786450 tid 0
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New pid 786450 tid 1]
Symbols already loaded for /opt/qnx650/target/qnx6/x86/usr/lib/libQtGui.so.4
Symbols already loaded for /opt/qnx650/target/qnx6/x86/usr/lib/libgf.so.1
Symbols already loaded for /opt/qnx650/target/qnx6/x86/usr/lib/libQtNetwork.so.4
Symbols already loaded for /opt/qnx650/target/qnx6/x86/lib/libsocket.so.3
Symbols already loaded for /opt/qnx650/target/qnx6/x86/usr/lib/libQtCore.so.4
Symbols already loaded for /opt/qnx650/target/qnx6/x86/lib/libcpp.so.4
Symbols already loaded for /opt/qnx650/target/qnx6/x86/lib/libc.so.3
Symbols already loaded for /opt/qnx650/target/qnx6/x86/usr/lib/libz.so.2
Symbols already loaded for /opt/qnx650/target/qnx6/x86/lib/libm.so.2
Symbols already loaded for /opt/qnx650/target/qnx6/x86/lib/dll/devg-vmware.so
Symbols already loaded for /opt/qnx650/target/qnx6/x86/usr/lib/libffb.so.2
0xb033e251 in SignalWaitinfo () from /opt/qnx650/target/qnx6/x86/lib/libc.so.3
(gdb) break QPushButton::keyPressEvent(QKeyEvent*)
Breakpoint 1 at 0xb895e176
(gdb) cont
Continuing.

(This breakpoint is triggered when the user presses a key.)

Breakpoint 1, 0xb895e176 in QPushButton::keyPressEvent () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtGui.so.4
(gdb) bt
#0  0xb895e176 in QPushButton::keyPressEvent () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtGui.so.4
#1  0xb84b66a0 in QWidget::event () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtGui.so.4
#2  0xb88b66be in QAbstractButton::event () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtGui.so.4
#3  0xb895e5d2 in QPushButton::event () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtGui.so.4
#4  0xb845de5c in QApplicationPrivate::notify_helper () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtGui.so.4
#5  0xb8464be1 in QApplication::notify () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtGui.so.4
#6  0xb90f9383 in QCoreApplication::notifyInternal () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtCore.so.4
#7  0xb84dd862 in QETWidget::translateKeyEvent () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtGui.so.4
#8  0xb84dddaa in QApplication::qwsProcessEvent () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtGui.so.4
#9  0xb84e8224 in QEventDispatcherQWS::processEvents () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtGui.so.4
#10 0xb90f7b39 in QEventLoop::processEvents () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtCore.so.4
#11 0xb90f7f9a in QEventLoop::exec () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtCore.so.4
#12 0xb90fba0f in QCoreApplication::exec () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtCore.so.4
#13 0xb845df07 in QApplication::exec () from /opt/qnx650/target/qnx6/x86/usr/lib/libQtGui.so.4
#14 0x08048af3 in main ()
(gdb)