Can I make my Qt project downloadable through package tool - qt

I'm wondering if there is a way to make my Qt application be downloadable through for example APT and can be executed?
As an example, I downloaded "pinta" using following command sudo apt install pinta
and then i could just write pinta in terminal, and it would open the program.
Is it possible to do it Qt projects?

Related

Qt-default version issue on migration from RPi4 to NVIDIA Jetson Nano

Having an issue on migrating a Qt project from RPi4 to NVIDIA Jetson Nano. We wanted to migrate our project to Jetson Nano to improve image processing performance.
The qt dependency of our project is >= 5.11. But Jetson Nano uses Ubuntu 18.04.4 and it has qt5-default package pre-installed in it (in my understanding some system files use it). And this qt5-default packages version is 5.9.5.
I tried to downgrade my qt dependency, but every change made lead to harder to fix issue.
I tried to upgrade default qt5 version but couldn't find any similar guidance. The guides/questions already exists are about x86 etc. environment. Couldn't find any ARM based solution. The qt downloads doesn't give any buildable for ARM env (or I can't find them). The official documents only talks about cross-compiling.
What should I do to overcome this issue? Thanks in advance.
Okay I finally was able to successfully compile QT 5.12.9 on the Nano itself (no cross compilation).
The steps I did:
git clone https://code.qt.io/qt/qt5.git
cd qt5
git checkout 5.12.9
Then
git submodule update --init --recursive
cd ~
mkdir qt5-build
cd qt5-build
Configure and build
../qt5/configure -nomake examples -nomake tests -skip qtwebengine
make
sudo make install
Make took like nearly a whole day to compile all sources. Also I had some compilation errors before. However after skipping webengine and not building the tests and examples in ./configure I was finally able to sucessfully make it.

QtQml installation in Raspberry pi

I am stuck with one error while building PyQt5 for rasberry pi. I was successfully able to run the application which uses QQmlApplicationEngine on Windows Desktop. Now I wanted to run the same application in Raspberry pi 3. I build the PyQt5 (5.4.1v) from the source and tried running the application but I get error:
ImportError: No Module Found "PyQt5.QtQml".
I realized that, when I build the PyQt5 from the source, I get:
Project Error: Unknown module(s) in QT: qml
and shows me a list of modules which will be built.
Just for a reference, I am using a raspbian, and have installed the following before building PyQt5.
sudo apt-get update
sudo apt-get install qtcreator
sudo apt-get install qt5-qmake
added "export QT_SELECT = qt5" to my "~/.profile" and "~/.bashrc"
sudo apt-get install qt5-default qt5-qmake qtbase5-dev-tools qttools5-dev-tools build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb++-dev libgl1-mesa-dev
How am I supposed to install QtQml in PyQt5? Please help...
Thanks in Advance.
PyQt5 is (as you perhaps know) just a wrapper for the Qt C++ libraries. In order to use a specific module in PyQt5 the underlying C++ library needs to be installed.
The first error message shows that PyQt5.QtQml module is missing which respectively leads to the conclusion that the underlying Python wrapper is missing.
The second error message is probably generated on the C++ level and means that the required Qt C++ library for this module is missing.
Since you are building PyQt5 you not only need the runtime libraries but also the development packages for Qt. For QML you need the qtdeclerative5-dev package and the libqt5qml5 (I think that was the name for the runtime library). These of course depend on a bunch of other packages which will automatically be installed.
PS: Don't forget the SIP library which PyQt has as a dependency no matter which Qt modules you want to use.

Why is there no qmake-qt5 included in the qt5-default package

I installed qt5-default on my Odroid XU3 using the the sudo apt-get install qt5-default command and wanted to run qmake-qt5 using the terminal but it printed that this command is unknown. Then I looked in the usr/share/qt5 folder and noticed that there is only the doc-foder inside. I also looked in the usr/bin folder and could only find qmake-qt4 but no qmake-qt5. When I run the install command, I also read that some libraries will be installed, so I think, libraries are not the problem.
Next I tried to install qmake-q5t manually from this page https://launchpad.net/ubuntu/trusty/+package/qt5-qmake but then I got a message that there is a newer version of qmake-qt5 already installed. I searched the whole system using the find command for qmake-qt5 but couldn't detect it.
Last I also tried to add the ubuntu-sdk ppa using as described here https://askubuntu.com/questions/279421/how-can-i-install-qt-5-x-on-12-04-lts but this also didn't work out.
Does it have something to do with my Odroid or with Lubuntu? Is there any other way to install qmake-qt5?
I tried to compile and make with the already installed qt4 and this did work out using
qmake-qt4 -project
qmake-qt4
make
./helloworld
I want do the same but only with qt5
Thanks in advance
The qmake executable is installed in /usr/lib/<your_arch>/qt5/bin as qmake (no -qt5 suffix).
You can check with qmake --version, it should report you a Qt version 5.x.x

How to configure compiler in debian os QT kit

I installed QT creator in debian linux. If I try to create a new project, in Kit option I got the error like "No valid Kit found". If I go to Tools ->Options -> Build&Run -> kit, there is no options to select. But I installed same in ubuntu, it is working fine without same problem. What im missing?
Also suggest me if I need to reinstall the QT creator or something else...
Its time to explain the tricks to install QT creator in debian linux operating system.
STEP 1: dont install just QT creator in your PC.
Install whole package of QT [link to download QT SDK below][1]
[1]: http://www.qt.io/download-open-source/#section-2 , so that you will get all the libraries and dependencies.
After downloading the file is in the ".run" format . Install the downloaded file in your terminal (by giving commands).
STEP 2: install
sudo apt-get install g++
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
in your terminal.
STEP 3: install
sudo apt-get install libcanberra-gtk-module
sudo apt-get install libcanberra-gtk-module:i386
now restart your system once and create new project.It should work
I like to thank agold for his guidance , Actually he spent more than 3 hours to resolve this issue. :)

Build Project with QtSerialPort

I want to build a project wich is using QtSerialPort. I'm using Qt 5.2.1 and Ubuntu 14.04.2 LTS. So, I have not to download QtSerialPort (?) See the news from 2013-07-03 here.
I'm creating a Makefile with cmake, which works. If I execute make, I got this error:
fatal error: private/qringbuffer_p.h: No such file or directory.
I have no idea what I have to do. Maybe it is a problem between Qt4 and Qt5?
If I clone the mirror as described here under Gettig the source code I can't execute the command
git checkout qt5.2.1

Resources