QT Creator and Tool Chains

General programming chat and advice for beginners

14 posts
by lordjaggd28 » Sun May 12, 2013 3:18 pm
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?
Posts: 11
Joined: Thu Apr 04, 2013 8:08 am
by Steve Andrew » 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
Posts: 2
Joined: Sun Oct 07, 2012 7:00 am
Location: Gold Coast, QLD, Australia
by lordjaggd28 » Tue May 14, 2013 7:49 am
Thank you for the reply. I'll give it a try tonight.
Posts: 11
Joined: Thu Apr 04, 2013 8:08 am
by CopterRichie » Wed Aug 21, 2013 10:35 pm
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.
User avatar
Posts: 131
Joined: Tue Mar 26, 2013 3:14 am
Location: Los Angeles CA.
by mad-hatter » Wed Aug 21, 2013 11:10 pm
Hello,

Try sudo apt-get install qtcreator - Lower case Q

Regards
User avatar
Posts: 416
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside
by goustafson » Tue Oct 08, 2013 2:48 pm
When i use "sudo apt-get install qtcreator" 11 files are going to remove. One of them is qmake. Any idea?
Posts: 1
Joined: Tue Oct 08, 2013 2:45 pm
by camolas » Thu Nov 07, 2013 3:11 pm
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
Posts: 69
Joined: Mon Jun 17, 2013 6:58 pm
by llmccam » Wed Feb 05, 2014 11:31 pm
@Steve Andrew: THANK YOU SOOOOOOOOOOOOO MUCH FOR THE TUTORIAL INFORMATION :)))))))))))))
Posts: 9
Joined: Wed Feb 05, 2014 5:12 am
by rasp87 » Tue Feb 18, 2014 8:13 am
Thanks a lot about this thread! My qt had some configuration problems that were all solved with the instructions here.
Posts: 94
Joined: Thu Jun 27, 2013 7:02 am
by mosttly » Wed Sep 24, 2014 7:28 am
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.
Learning Begets Learning
Posts: 7
Joined: Sun May 18, 2014 4:30 am
by 064RPiSCADA » Sun Dec 07, 2014 7:03 pm
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....
Posts: 2
Joined: Sat Nov 22, 2014 1:26 pm
by mad-hatter » Sun Dec 07, 2014 9:46 pm
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
User avatar
Posts: 416
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside
by 064RPiSCADA » Mon Dec 08, 2014 1:07 am
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...
Posts: 2
Joined: Sat Nov 22, 2014 1:26 pm
by mad-hatter » Mon Dec 08, 2014 10:10 am
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
User avatar
Posts: 416
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside