Page 1 of 1

QT Creator and Tool Chains

Posted: Sun May 12, 2013 3:18 pm
by lordjaggd28
I have just installed qt creator using the following command:
sudo apt-get qtcreator

It seems to have installed okay, problem is when I try to create a new project it fails saying "No valid QT version found."

And then points me to Build & Run

What do I need to put in there?

Re: QT Creator and Tool Chains

Posted: Tue May 14, 2013 12:19 am
by Steve Andrew
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

Re: QT Creator and Tool Chains

Posted: Tue May 14, 2013 7:49 am
by lordjaggd28
Thank you for the reply. I'll give it a try tonight.

Re: QT Creator and Tool Chains

Posted: Wed Aug 21, 2013 10:35 pm
by CopterRichie
I tried using "sudo apt-get install Qtcreator" but I am receiving "E: Unable to locate package Qtcreator". What am I doing wrong or what Precursor have I not done?

thank you.

Never mind, spelling error.

Re: QT Creator and Tool Chains

Posted: Wed Aug 21, 2013 11:10 pm
by mad-hatter
Hello,

Try sudo apt-get install qtcreator - Lower case Q

Regards

Re: QT Creator and Tool Chains

Posted: Tue Oct 08, 2013 2:48 pm
by goustafson
When i use "sudo apt-get install qtcreator" 11 files are going to remove. One of them is qmake. Any idea?

Re: QT Creator and Tool Chains

Posted: Thu Nov 07, 2013 3:11 pm
by camolas
Hi,

I cant find the the g++ in the add button

Code: Select all

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++".
please hellp me thanks

Re: QT Creator and Tool Chains

Posted: Wed Feb 05, 2014 11:31 pm
by llmccam
@Steve Andrew: THANK YOU SOOOOOOOOOOOOO MUCH FOR THE TUTORIAL INFORMATION :)))))))))))))

Re: QT Creator and Tool Chains

Posted: Tue Feb 18, 2014 8:13 am
by rasp87
Thanks a lot about this thread! My qt had some configuration problems that were all solved with the instructions here.

Re: QT Creator and Tool Chains

Posted: Wed Sep 24, 2014 7:28 am
by mosttly
Hi All,

As soon as I install qtcreator using apt-get it removed the qt4-dev-tools; hence I am left with no "/usr/bin/qmake-qt"

Any suggestions.

Re: QT Creator and Tool Chains

Posted: Sun Dec 07, 2014 7:03 pm
by 064RPiSCADA
Hi - Managed to get Qt-Creator to open my project, however there is 1 error that I could use some expertise on. Qt 4.8.2 and it shows 1 error, qwt_plot.h No such file or directory. The project I downloaded from GitHub had all the other files required except this qwt_plot.h

Where can I get this file?

Thank you in advance.

BTW this Qt4 stuff is pretty hard core and just blows me away....

Re: QT Creator and Tool Chains

Posted: Sun Dec 07, 2014 9:46 pm
by mad-hatter
Hello 064RPiSCADA,

sudo apt-get install synaptic
This will show almost all the available programmes for the Pi.
Once you get it running, use the toolbar search for QWT.
You will get a whole bunch of programs showing.
You will have to decide which to install. They can be installed from within synaptic or by noting the package name and using sudo apt-get packagename.
Be careful, synaptic won't show you the size of the files it installs, you might fill your SD card.

Regards

Re: QT Creator and Tool Chains

Posted: Mon Dec 08, 2014 1:07 am
by 064RPiSCADA
Thank you mad-hatter ! Got it running (apt-get libqwt-dev did the trick). I remember synaptic from running JoliCloud OS. Good to know it runs on RPi.

Also seen your post on VNC to Qt app - to do later.

Would like more info on the FF32 and how to get one in the USA...

Re: QT Creator and Tool Chains

Posted: Mon Dec 08, 2014 10:10 am
by mad-hatter
Hello
064RPiSCADA wrote:Would like more info on the FF32 and how to get one in the USA...
ff32 info:-
http://www.flyfish-tech.com/FF32/index.php
There is an email contact form link on this page.

With 'synaptic' you can do a search on qt4/qt3 to decide what goodies to add.

Regards