Page 1 of 1

qtcreator on Raspbian

Posted: Thu Jul 19, 2012 5:45 am
by janvb
hi,

I would like to try qtcreator on raspbian. I have installed qtcreator, but it seems to have issues with it's own qmake executables/sdk. Have someone sucessfully installed and used this? I am not interested in the qt libraries, I just wanted to try the IDE part on plain C++.

Also, can someone recommend another C++ editor/IDE that will work for Raspbian? I can use any editor and shell, but I would seriously preffer an IDE with a proper, working debugger integrated.

Re: qtcreator on Raspbian

Posted: Thu Jul 19, 2012 10:50 pm
by Narishma
I don't have a Pi yet so I can't help you with QtCreator. As for alternatives, try Code::Blocks or CodeLite.

Re: qtcreator on Raspbian

Posted: Fri Jul 20, 2012 10:22 am
by Max
janvb wrote: I would like to try qtcreator on raspbian. I have installed qtcreator, but it seems to have issues with it's own qmake executables/sdk. Have someone sucessfully installed and used this? I am not interested in the qt libraries, I just wanted to try the IDE part on plain C++.
Compiling should go fine, but pressing "run" from the IDE might not work out of the box.
It seems to detect that you are compiling for an ARM architecture and then automagically assumes that you are going to deploy your program on a remote target (e.g. phone).

To fix that:

- 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.

Re: qtcreator on Raspbian

Posted: Fri Jul 20, 2012 5:30 pm
by FrozenFirestorm
Thank you that was most helpful! I got an error after that just by starting a new project. When i build a console application, it gives the error the 'Cannot change to working directory '/path/to/program' No such file or directory'.

Re: qtcreator on Raspbian

Posted: Sat Jul 21, 2012 4:29 pm
by Max
And /path/to/program is?
Your own compiled console program in /home/pi? Or one of the compiler tools?

Re: qtcreator on Raspbian

Posted: Sat Jul 21, 2012 5:51 pm
by FrozenFirestorm
Ive made numerous paths, /home/pi is the one im running now, gui apps work, but the moment i run a console application I get the error. :shock: sooo yes something to do with terminal? I donno... sigh

Re: qtcreator on Raspbian

Posted: Fri Nov 30, 2012 1:02 am
by himbeergeist
Hi,

I've got my raspberry pi and now I try to get qtcreator running.
First sudo apt-get install qtcreator.
Then I did what Max suggested
-unchecked "remote linux"
-restarted
-tools->options->Build & Run->qt version where I could select "Qt 4.8.2(System) /usr/bin/qmake-qt4"
But this appears with a red exclamation mark on its left side.
And the status bar of that dialog says: "No tool chain can produce code for this Qt version. Please define one or more tool chains."

Any suggestions?

Re: qtcreator on Raspbian

Posted: Fri Nov 30, 2012 1:38 am
by Narishma
himbeergeist wrote:Hi,

I've got my raspberry pi and now I try to get qtcreator running.
First sudo apt-get install qtcreator.
Then I did what Max suggested
-unchecked "remote linux"
-restarted
-tools->options->Build & Run->qt version where I could select "Qt 4.8.2(System) /usr/bin/qmake-qt4"
But this appears with a red exclamation mark on its left side.
And the status bar of that dialog says: "No tool chain can produce code for this Qt version. Please define one or more tool chains."

Any suggestions?
Do you have a compiler(g++) installed?

Re: qtcreator on Raspbian

Posted: Fri Nov 30, 2012 7:32 pm
by himbeergeist
gcc --version tells me
gcc (Debian 4.6.3-8+rpi1) 4.6.3
so yes, gcc is installed.


edit:
btw. g++ --version has the same result, to answer your question precisely.

Re: qtcreator on Raspbian

Posted: Sat Dec 01, 2012 1:16 am
by himbeergeist
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!

Re: qtcreator on Raspbian

Posted: Sat Dec 01, 2012 10:37 pm
by himbeergeist
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

Re: qtcreator on Raspbian

Posted: Sat Dec 08, 2012 1:29 pm
by chalathip
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.

Re: qtcreator on Raspbian

Posted: Fri Feb 01, 2013 3:19 pm
by arti0504
Hi,

Could you tell me step by step, how can I install Qt creator on Raspberry Pi ?

Re: qtcreator on Raspbian

Posted: Fri Feb 01, 2013 3:36 pm
by Cloudcentric
arti0504 wrote:Hi,

Could you tell me step by step, how can I install Qt creator on Raspberry Pi ?
sudo apt-get install qtcreator

Re: qtcreator on Raspbian

Posted: Mon Feb 11, 2013 10:00 am
by arti0504
ok, and which and how must I library install?

Re: qtcreator on Raspbian

Posted: Mon Feb 11, 2013 2:14 pm
by Spid
Installing QTCreator will install all the required dependencies etal

Qt Creator is a new, lightweight, cross-platform integrated development
environment (IDE) designed to make development with the Qt application
framework even faster and easier.

It includes:
* An advanced C++ code editor
* Integrated GUI layout and forms designer
* Project and build management tools
* Integrated, context-sensitive help system
* Visual debugger
* Rapid code navigation tools
* Supports multiple platforms

Re: qtcreator on Raspbian

Posted: Mon Feb 11, 2013 2:32 pm
by PS1981
There are problems when instaling QT. Here is a guide (sorry if someone posted these eteps somewhere above, I've not read the whole post)
http://qt-project.org/wiki/apt-get_Qt4_ ... spberry_Pi
If you follow that it should get it working (normally does anyway). If you just do sudo apt-get qtcreator then it does install qt4, but it doesn't work properly yet.

Re: qtcreator on Raspbian

Posted: Sat Feb 16, 2013 11:58 am
by arti0504
ok, thx :)

How can I use Qt creator and library wiringPi.h from this website:

https://projects.drogon.net/raspberry-pi/wiringpi/

I think, that I must add somewhere in Qt creator directory of wiringPi library ?

Re: qtcreator on Raspbian

Posted: Thu Feb 21, 2013 5:16 pm
by -rst-
http://www.raspberrypi.org/phpBB3/viewt ... 81#p289037

...I would assume there is a way to set the include ans library paths somewhere in QtCreator, without having to edit the .pro file...

Re: qtcreator on Raspbian

Posted: Thu Feb 21, 2013 5:43 pm
by PS1981
arti0504 wrote:ok, thx :)

How can I use Qt creator and library wiringPi.h from this website:

https://projects.drogon.net/raspberry-pi/wiringpi/

I think, that I must add somewhere in Qt creator directory of wiringPi library ?
I would advise you to take a look at this topic, it may be a useful example.
http://www.raspberrypi.org/phpBB3/viewt ... 33&t=33881

Re: qtcreator on Raspbian

Posted: Sun Jan 05, 2014 2:03 am
by g.aerts
Hi Albert,

Best wishes for the new year.

I folowed your guide lines and created a running image on a sd card.
The raspberry boots from it and i can run a SSH session to it from my Host.

The next thing i was trying to do was to setup the tools environmont for this cross compiler.
With the devices i was able to add one and test.
Butt then the compilers, debuggers, sysroot i got stuck ???

I'm working on Ubuntu 12.04 LTS 64 bit.
I installed QT Creator 3.0.0 (Build Dec 10 2013)
The location of "buildroot-rpi" is "/home/beaertsg/albertd/buildroot-rpi"

Kind regards
Guido

Re: qtcreator on Raspbian

Posted: Sun Jan 05, 2014 10:21 am
by mad-hatter
Hello,

Have a look at this post:-
http://www.raspberrypi.org/phpBB3/viewt ... 31&t=43545
Shows how to set up qtcreator.
Works for me.

Regards