janvb
Posts: 5
Joined: Sat Jul 07, 2012 5:40 pm

qtcreator on Raspbian

Thu Jul 19, 2012 5:45 am

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.

Narishma
Posts: 151
Joined: Wed Nov 23, 2011 1:29 pm

Re: qtcreator on Raspbian

Thu Jul 19, 2012 10:50 pm

I don't have a Pi yet so I can't help you with QtCreator. As for alternatives, try Code::Blocks or CodeLite.

Max

Re: qtcreator on Raspbian

Fri Jul 20, 2012 10:22 am

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.

FrozenFirestorm
Posts: 8
Joined: Mon Mar 05, 2012 9:49 am

Re: qtcreator on Raspbian

Fri Jul 20, 2012 5:30 pm

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

Max

Re: qtcreator on Raspbian

Sat Jul 21, 2012 4:29 pm

And /path/to/program is?
Your own compiled console program in /home/pi? Or one of the compiler tools?

FrozenFirestorm
Posts: 8
Joined: Mon Mar 05, 2012 9:49 am

Re: qtcreator on Raspbian

Sat Jul 21, 2012 5:51 pm

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

himbeergeist
Posts: 7
Joined: Mon Nov 26, 2012 2:04 am

Re: qtcreator on Raspbian

Fri Nov 30, 2012 1:02 am

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?

Narishma
Posts: 151
Joined: Wed Nov 23, 2011 1:29 pm

Re: qtcreator on Raspbian

Fri Nov 30, 2012 1:38 am

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?

himbeergeist
Posts: 7
Joined: Mon Nov 26, 2012 2:04 am

Re: qtcreator on Raspbian

Fri Nov 30, 2012 7:32 pm

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.

himbeergeist
Posts: 7
Joined: Mon Nov 26, 2012 2:04 am

Re: qtcreator on Raspbian

Sat Dec 01, 2012 1:16 am

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!

himbeergeist
Posts: 7
Joined: Mon Nov 26, 2012 2:04 am

Re: qtcreator on Raspbian

Sat Dec 01, 2012 10:37 pm

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

chalathip
Posts: 1
Joined: Sat Dec 08, 2012 1:16 pm

Re: qtcreator on Raspbian

Sat Dec 08, 2012 1:29 pm

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.

arti0504
Posts: 24
Joined: Wed Jan 30, 2013 8:40 am

Re: qtcreator on Raspbian

Fri Feb 01, 2013 3:19 pm

Hi,

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

Cloudcentric
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am

Re: qtcreator on Raspbian

Fri Feb 01, 2013 3:36 pm

arti0504 wrote:Hi,

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

arti0504
Posts: 24
Joined: Wed Jan 30, 2013 8:40 am

Re: qtcreator on Raspbian

Mon Feb 11, 2013 10:00 am

ok, and which and how must I library install?

Spid
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm

Re: qtcreator on Raspbian

Mon Feb 11, 2013 2:14 pm

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
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !

PS1981
Posts: 446
Joined: Wed Dec 12, 2012 4:11 pm

Re: qtcreator on Raspbian

Mon Feb 11, 2013 2:32 pm

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.

arti0504
Posts: 24
Joined: Wed Jan 30, 2013 8:40 am

Re: qtcreator on Raspbian

Sat Feb 16, 2013 11:58 am

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 ?

-rst-
Posts: 1316
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: qtcreator on Raspbian

Thu Feb 21, 2013 5:16 pm

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...
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'

PS1981
Posts: 446
Joined: Wed Dec 12, 2012 4:11 pm

Re: qtcreator on Raspbian

Thu Feb 21, 2013 5:43 pm

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

g.aerts
Posts: 1
Joined: Sun Jan 05, 2014 1:47 am

Re: qtcreator on Raspbian

Sun Jan 05, 2014 2:03 am

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

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: qtcreator on Raspbian

Sun Jan 05, 2014 10:21 am

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

Return to “C/C++”

Who is online

Users browsing this forum: No registered users and 5 guests