Hi all, I would like to install qt on my pi so I have installed in the terminal and it does not work as it says no valid Qt versions found when I try to make a new project in the application. Please help.
Many thanks
Re: How to install QT?
If you have all the correct qt packages install then there should be no problem.
I think the command "sudo apt-get install qt4-dev-tools" should be enough to get what yon need.
If you copy an existing project to your Pi it should build easily if you use qmake first:
I don't use qtcreator on the Pi.
I think the command "sudo apt-get install qt4-dev-tools" should be enough to get what yon need.
If you copy an existing project to your Pi it should build easily if you use qmake first:
Code: Select all
$ qmake
$ make
Memory in C++ is a leaky abstraction .
Re: How to install QT?
This did not work, it said this was already installed when I typed it in to the terminal. Thanks anyway!
Re: How to install QT?
Do try to help us to help you.
What did not work exactly?
What was installed already exactly?
Have you tried creating the most simple "Hello world" Qt program and building it ?
What did not work exactly?
What was installed already exactly?
Have you tried creating the most simple "Hello world" Qt program and building it ?
Code: Select all
$cd ~/your_project_folder/
$ qmake -project
$ qmake
$ make
Memory in C++ is a leaky abstraction .
Re: How to install QT?
I am assuming you are using raspbian image.
Installation Steps:
0. Set proper date and time and go for "sudo apt-get update" and "sudo apt-get upgrade"
1. sudo apt-get install qt4-dev-tools
2. sudo apt-get install qtcreator
3. sudo apt-get install gcc
sudo apt-get install xterm
sudo apt-get install git-core
sudo apt-get install subversion
Step 3 is optional but do it anyways.
4.Open Qtcreator and do the following:
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
5. 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”
This is all you need to install qt on raspberry pi. you can then start working on Qtcreator.
However there is a problem that the code u write in Qt does not get built and compiled from the normal build and run button of Qt.. you need to do it from LXTerminal.
Steps for compiling and running:
after you have written all ur code in whatever files (source and headers both).. do "save all" from file menu..
then open LXterminal and make the current directory as the directory where you had opted to save the project files(while starting a new project).
1. qmake -project
2. qmake <yourprojectname>.pro
3. make (//For compilationn of the code)
4. sudo ./<yourprojectname> (//For running the program)
Note: Step 1 and 2 need to be done only once for the first time. No harm if u do it again. Afterwards if u change the code and want to recompile then only "make" command should suffice.
Installation Steps:
0. Set proper date and time and go for "sudo apt-get update" and "sudo apt-get upgrade"
1. sudo apt-get install qt4-dev-tools
2. sudo apt-get install qtcreator
3. sudo apt-get install gcc
sudo apt-get install xterm
sudo apt-get install git-core
sudo apt-get install subversion
Step 3 is optional but do it anyways.
4.Open Qtcreator and do the following:
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
5. 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”
This is all you need to install qt on raspberry pi. you can then start working on Qtcreator.
However there is a problem that the code u write in Qt does not get built and compiled from the normal build and run button of Qt.. you need to do it from LXTerminal.
Steps for compiling and running:
after you have written all ur code in whatever files (source and headers both).. do "save all" from file menu..
then open LXterminal and make the current directory as the directory where you had opted to save the project files(while starting a new project).
1. qmake -project
2. qmake <yourprojectname>.pro
3. make (//For compilationn of the code)
4. sudo ./<yourprojectname> (//For running the program)
Note: Step 1 and 2 need to be done only once for the first time. No harm if u do it again. Afterwards if u change the code and want to recompile then only "make" command should suffice.
- mad-hatter
- Posts: 419
- Joined: Sun Feb 26, 2012 2:58 pm
- Location: By the UK seaside
Re: How to install QT?
Hello,
I can't find the link at the moment.
edit, found the link:- http://www.raspberrypi.org/phpBB3/viewt ... 31&t=43545
Regards
I have the build and run button working on my QT4 setup. Somewhere on this forum there are instructions on how to do this.shashankt said:
However there is a problem that the code u write in Qt does not get built and compiled from the normal build and run button of Qt.. you need to do it from LXTerminal
I can't find the link at the moment.
edit, found the link:- http://www.raspberrypi.org/phpBB3/viewt ... 31&t=43545
Regards
-
- Posts: 1
- Joined: Mon Sep 26, 2016 1:12 pm
Re: How to install QT?
If anyone is trying to install Qt in a raspberry pi, and develop GUI in rpi, following are the steps that you want to follow in a nutshell
1. Update your raspberry pi -
2. Upgrade your raspberry pi -
3. Install Qt - (I have used Qt5) -
4. Install Qt creator -
5. Open Qtcreator and go to Help > about plugins and and untick Remote Linux
6. Restart your raspberry pi
7. Again open Qt creator, go to "Tools > Options > Build and Run" and go to Compilers. Add "GCC" set compiler path as /usr/bin/gcc
8. Normally Qt version and Debugger will be automatically set, but you can also set them
9. Then go to Kits (Still inside the Build and Run) and check whether Compiler, Debugger and Qt version are set
10. That's it , click Ok and create a new project
1. Update your raspberry pi -
Code: Select all
sudo apt-get update
Code: Select all
sudo apt-get upgrade
Code: Select all
sudo apt-get install qt5-default
Code: Select all
sudo apt-get install qtcreator
6. Restart your raspberry pi
7. Again open Qt creator, go to "Tools > Options > Build and Run" and go to Compilers. Add "GCC" set compiler path as /usr/bin/gcc
8. Normally Qt version and Debugger will be automatically set, but you can also set them
9. Then go to Kits (Still inside the Build and Run) and check whether Compiler, Debugger and Qt version are set
10. That's it , click Ok and create a new project
- MrWheeliebin
- Posts: 8
- Joined: Sun Jun 10, 2012 12:13 am
- Location: Wheeliebinland
Re: How to install QT?
Thanks for all this. Can I just add that I got this up from the instructions above but also needed to `sudo apt-get install qtdeclarative5-dev` to get the default Qt apps to build.