Tue May 14, 2013 12:19 am
I had a similar problem. I found this article, many thanks to the original poster - Sadly I did not save the link. Sorry if it is a little long winded but it does seem to address most of the problems a new Qt user will experience.
....................................................................................................
Tutorial : apt-get install Qt4 on the Rasperry Pi
Using the Raspbian image
apt-get
Firstly I got the development tools needed by Qt Creator in the hope it would be less heavy for the Pi to download separately.
sudo apt-get install qt4-dev-tools
Then I went for Qt Creator
sudo apt-get install Qtcreator
I also installed
sudo apt-get install gcc
sudo apt-get install xterm
sudo apt-get install git-core
sudo apt-get install subversion
this gives as a result Qt Creator 2.5 with Qt 4.8.1 32 bit
Problem : no toolchain.
We can only compile for remote embedded devices and this is not the case here, because we are on the Pi and not remotely accessing it.
I added a gcc toolchain
Options > build & run > tab tool chain > button add
Choose GCC
Then set compiler path : /usr/bin/arm-linux-gnueabihf-gcc-4.6
Debugger : /usr/bin/gdb
Mkspec : default
Qt Creator seems to detect that we are going to deploy on a remote target.
To fix this :
Go to menu help > about plugins
Uncheck device support > remote linux
Restart Qt Creator
Go to tools > options TAB > build & run > Qt versions > add “/usr/bin/qmake-qt4”
It will then show up as a desktop project in the project wizard instead of embedded.
/////////////////////////////////////
Go to menu "help" -> "plugins"
- Uncheck "device support" -> "remote linux"
- Restart Qt Creator
- Go to "tools" "options" tab "Build & Run" -> "Qt versions" -> add "/usr/bin/qmake-qt4" again.
It will then show up as "Qt version 4.8.1 for Desktop" instead of embedded and work ok.
/////////////////////////////////////
Finally I found the problem. It was a rather stupid error.
In addition to the configuration steps that Max pointed out, you have to go to the "Tool Chains" dialog. Select the g++ toolchain and then browse to the /usr/bin directory and select the "g++".
That's all!
////////////////////////////////////
Then I ran into FrozenFirestorm's problem when I tried to run a console application:
'Cannot change to working directory' 'No such file or directory'
Solution to that:
In the navigation bar on left side of the screen go to "Projects".
From the navigation bar on top of the screen choose "Run Settings".
Then uncheck the check box "Run in terminal".
voila, it works
Posts: 7
Joined: Mon Nov 26, 2012 2:04 am
///////////////////////////////
The problem is about "lxterminal".
So my suggestion is to
1. install xterm.
$ sudo apt-get install xterm
2. configure qtcreator,
"Tools -> Options -> Environment -> Terminal " : /usr/bin/xterm -e
And if you uncheck the check box "Projects -> Run Settings -> Run in Terminal".
then recheck it again.
/////////////////////////////
Once again, many thanks to the original poster for an excellent tutorial
Experience is proportional to equipment destroyed