Building an example Qt app (newbie)

Javier Mr javiersdevmail at ymail.com
Sat Nov 15 12:08:04 UTC 2014


Ok, never mind. I had a type in the line 'find_package(QT5Widgets REQUIRED)', the t in QT should be in lower case, after that it compiles and runs correctly.


El Viernes 14 de noviembre de 2014 21:36, Javier Mr <javiersdevmail at ymail.com> escribió:
 

>
>
>Hello,
>
>
>I've been an Ubuntu user for almost 6 yers now and software developer a while. However I've rarely combine both. When it cames to Qt, I've never use it in development.
>
>
>Am facing various problems mixed with ignorance. I have borrowed an example code from the web and the CMakeLists file, in it I've placed 'find_package(QT5Widgets REQUIRED)', but it is failing to find it, even though i've installed the 'libqt5quickwidgets5' package, I'm asssuming that I need the development one, probably something like 'libqt5quickwidgets5-dev', however It seems there is no such package.
>
>
>Another question, in the cmake modules dir (/usr/share/cmake-3.0.0/Module) I see 'FindQt3, FindQt4 and FindQt; should I expect also the Qt5 to be there?, I'm a little bit confused because 'find_package(Qt5Core REQUIRED)' throws no errors.
>
>
>Finally my machine is currently running Kubuntu 15.04 upgraded from Kubuntu 14.10 Tech Preview.
>
>
>Any help will be apreciated, also if there is a more suitable list for this kind of questions (but using ubuntu as the development platform) please let me know.
>
>
>Thanks in advance.
>
>
>Regards.
>
>
>Javier
>
>
>PD: The 'full' code and CMakeLists file.
>
>
>cmake_minimum_required(VERSION 3.0)
>project (qt-hello)
>find_package(QT5Widgets REQUIRED)
>find_package(Qt5Core REQUIRED)
>set(qt-hello_SRCS main.cpp)
>add_executable(qt-hello main.cpp)
>qt5_use_modules(qt-hello Core Gui Widgets)
>
>
>
>--
>
>
>
>#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();
>}
>
>
> 
>-- 
>kubuntu-devel mailing list
>kubuntu-devel at lists.ubuntu.com
>Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kubuntu-devel/attachments/20141115/49bb1891/attachment.html>


More information about the kubuntu-devel mailing list