Install QT5.1 in ubuntukylin 13.04
-
my OS is ubuntuylin 13.04,I download QT 5.1 int http://qt-project.org,
then I use- cmd "chmod 755 ./QT......run"
"./QT.....run"try to install QT5.1 and finish it work. and I going to make a first QT project.
I edit simple code by VIM, and move the file to a new file directory.(path = /home/jxf/gui)
I use cmd " cd /home/jxf/gui"
"qmake -project"and system tell me " qmake: could not find a Qt installation of ' ' ".....
now I use the IDE(QT creator) the question is "can't find file or directory"(it's chinese error ,I try to translate,my english is poor.........) code : #include<QApplication> // <==this line ,IDE tell me "can't find file or directory" #include<QLabel> int main(int argc, char* argv[]) { QApplication app(argc,argv); QLabel label = new QLabel("hello QT!"); label->show(); return app.exec(); } what should I do ......
-
@#include<QApplication> // <==this line ,IDE tell me “can’t find file or directory”
#include<QLabel>
int main(int argc, char* argv[])
{
QApplication app(argc,argv);
QLabel label = new QLabel(“hello QT!”);
label->show();
return app.exec();
}
@ -
Hi and welcome to devnet,
Since you are using Qt 5 you are missing:
@QT += widgets@
in your pro file
-
excuse me..
I'm a noob and thanks your E-mail,first,I building a new file that include these code.
@
#include<QApplication>
#include<QLabel>
int main(int argc, char* argv[])
{
QApplication app(argc,argv);
QLabel label = new QLabel(“hello QT!”);
label->show();
return app.exec();
}
@the name of file is qt.cpp.(path = /home/jxf/gui)
the second ,cmd "cd /home/jxf/gui"
so far,everything go well,for build a .pro, I use cmd "qmake -project", if all go well, I'll get a .pro(file).
but systen tell me " qmake: could not find a Qt installation of '' "what happen....
-
Are you sure you are using the qmake from Qt 5.1 ?
-
use this in your terminal mode:
@sudo apt-get install build-essential@