Adding plugins to Qt5 after a first installation - qt

I managed to build/configure/install qt5 in my Ubuntu machine, but I did not set xcb support. Now I would like to add support for this platform. Is there any way to add just this plugin without having to reconfigure/recompile/install the whole qt5 stuff?
Thanks.

It should be sufficient to:
cd <your_qt_sources>/qtbase/src/plugins/platforms/xcb
<your_qt_install_dir>/bin/qmake
make -j<n>
<> means replace with values according to your system.
You'll be told after the build is finished where the plugin was placed. Place it then in:
<your_qt_install_dir>/plugins/platforms/
You'll need to satisfy the dependencies (several xcb libs).

Related

How to build owncloud in windows?

I've read the manual of building the client for windows and skipped the steps one by one to step 4.
but unfortunately i'm not familiar with qt and cmake and the manual doesn't explain it as well
can anyone tell me how i should skip the rest of steps?
i don't know how to skip this step :
set PATH=C:<OpenSSL Install Dir>\bin;%PATH%
set PATH=C:<qtkeychain Clone Dir>;%PATH%
https://doc.owncloud.org/desktop/2.3/building.html#windows-development-build
These commands are to add ahead of your PATH the location of OpenSSL binaries folder and QT Keychain clone folder.
It's suppose you have this two tools already installed on your system and here you are just telling where to find them.

Get Qt5 up and running on a new Mac

Coming from Ubuntu I bought a new iMac and tried to setup my Qt development. Everything else is already up and running. Xcode command line tools are also installed.
Because it surprised me how good brewand brew caskworked I wanted to install Qt5with them. On the one side it is very fast and I do not have to got to any homepage in order to download it. On the other side I do not have to care about the installation directory. Having multiple version installed should also be a lot simpler though.
I used the following commands:
brew install qt5
brew cask install qt-creator
Qt5 is now installed under /usr/local/Cellar/qt5/5.4.1. I also added the bin folder to my path (done in .bash_profile). QtCreator, Linguist and all the other applications are shown in my launchpad. But unfortunately, it is still not done.
QtCreator says that no version of Qt is known. I tried to add qmake but I was not able to navigate to the folder mentioned above.
Could anybody give me a hint on how to fix this issue? Installing qt via installer should be the last option.
I had similar issue with Qt Creator, now on Mac GUI applications do not have access to environmental variables (in previous versions it was different).
You need to setup path to qmake in Qt Creator manually using Command-Shift-G in Finder to navigate to Folder you need.
Another option is to use brew link qt5 --force, which will symlink the various Qt5 binaries and libraries into your /usr/local/bin and /usr/local/lib directories. This will give you qmake at the command line, without requiring you to add anything special to your path in .bash_profile. The main reason this isn't done by default is that Qt4 is also somewhat popular.
It could get a little messy, but if you need to install Qt4 as well, you can unlink Qt5 at any time, by doing brew unlink qt5, and it will keep the installation intact. Then do brew install qt to get Qt4, which unlike the brew installation for Qt5 will indeed create the links directly into /usr/local without you having to manually do brew link qt. You can unlink Qt4 and relink Qt5 (or vice-versa) whenever you need to switch.
In my cases I needed to set it in Preferences => QT Versions => Add. Environment variables also did not help. Small popup when starting app also did not work.
I use command like this:
brew install qt#5
and. success install qt5 by brew.

Cannot cmake kde-connect

I am trying to install kde-connect following this.
Although my kubuntu version is 14.04, I wanted to compile them so that I can have the latest version. But when I followed the instructions to compile, i get the following error.
-- Found Qt-Version 5.2.1 (using /usr/bin/qmake)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
QT_QT_INCLUDE_DIR
used as include directory in directory /home/vinaychandra/Downloads/t/CMakeFiles/CMakeTmp
CMake Error: Internal CMake error, TryCompile configure of cmake failed
CMake Error at /usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:1311 (message):
Unable to compile a basic Qt application. Qt has not been found correctly.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindKDE4.cmake:95 (find_package)
CMakeLists.txt:7 (find_package)
Please point out how to correct this.
I have tried giving -DQT_QT_INCLUDE_DIR=/usr/share/qt4/
then it tells that You must build your code with position independent code if Qt was built with -reduce-relocations.
Your cmake by default uses a different QT version.
So, you must explicitly tell him which version of QT he have to use for this job.
This one
-DQT_QT_INCLUDE_DIR=/usr/share/qt4/
Is wrong because you mustn't give QT position explicitly.
All you need is to use the right qmake.
So, give'em this flag and you'll be happy!
-DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4
Since most of kde applications are not ported to Qt5, you need Qt4.x for building kdeconnect(don't know x, mine is 4.8.6).
Also Qt4 installer is not available (I think !), so you have to build it also from source. Building Qt4 is quite easy, just download the source and run the usual commands.
After building it, it qmake name will be qmake-qt4 in /usr/bin.
So for building kdeconnect, first run its cmake, then a Cmaketextcache.txt file will form.
In that change the path of qmake (i.e somewhere written /usr/bin/qmake to /usr/bin/qmake-qt4) and also the path of qt include dir to (I think /usr/include/qt5 to /usr/include/qt4), and run the cmake again.
If some packages are missing, then you have to install it.
But with the above changes, you will get a make file to install it.
Unfortunately, the cited documentation is lagging behind the current state of kdeconnect. I ran into similar problems but I managed to solve them by installing the following required packages from the Kubuntu repositories:
sshfs
libfakekey-dev
libxtst-dev
libqca2-dev
libqjson-dev
I trust these are all of them. I installed kdeconnect from the latest git commit and it seems to run fine.
This answer comes a bit late, but this is the first Google search result for the question. In systems with qtchooser (Kubuntu, Ubuntu at least), this can be fixed by running first:
export QT_SELECT=qt4
This makes all of the Qt build tools to default to the Qt4 version instead of Qt5. You can check which Qt version is active by running:
qmake --version
Try kde connect install on ubuntu: https://fazlerabbi37.github.io/blogs/install_kde_connect_in_ubuntu_18.04.html
(in 18.04 & 19.04 it works with simple sudo apt install kdeconnect
Install kde connect on android device (google play store is where I installed from)
Invoke kde connect from desktop
Invoke kde connect from android and search device.
Your ubuntu will be found / initiating a search from desktop results in android phone pulled up for pairing
Accept pairing request
Provide access to folders
Try clicking on a video/image file for transfer
I could see the new file transferring in /Downloads folder of desktop
allowing/disallowing desktop to access sms, notifications etc are now a choice
Note: Pl treat this with pinch of salt. This appears very simple, effective for a main reason it worked for me in no time.

qwt 6.1.0 on mac os 10.9 causes : Library not loaded: qwt.framework/Versions/6/qwt

I use qt-creator 5.2 and install qwt6.1.0 on the mac os 10.9. I follow the guide,and install the qwt6.1.0 success.
I use these cmd:
cd $QwtDir
qmake -spec macx-g++
make
sudo make install
sudo ln -s /usr/local/qwt-6.1.0/lib/qwt.framework/qwt /usr/lib/qwt
But when I compile the program, It occurs this problem:
dyld: Library not loaded: qwt.framework/Versions/6/qwt
what should I do?
I finally found the Solution: Just copy the qwt.framework to the Libary/Frameworks Folder and everything should work from now. I was looking for like 3 Hours for finding the right solution after reinstalling everything etc. Hope this helps.
From the Mac Developer Library:
Third-party frameworks can go in a number of different file-system locations, depending on certain factors.
Most public frameworks should be installed at the local level in /Library/Frameworks.
If your framework should only be used by a single user, you can install it in the ~/Library/Frameworks subdirectory of the current user; however, this option should be avoided if possible.
If they are to be used across a local area network, they can be installed in /Network/Library/Frameworks; however, this option should be avoided if possible.
For nearly all cases, installing your frameworks in /Library/Frameworks is the best choice. Frameworks in this location are discovered automatically by the compiler at compile time and the dynamic linker at runtime. Applications that link to frameworks in other directories, such as ~/Library/Frameworks or /Network/Library/Frameworks, must specify the exact path to the framework at build time so that the dynamic linker can find it. If the path changes (as it might for a user home directory), the dynamic linker may be unable to find the framework.

CMake flags are pointing to the wrong Qt version

Flags like QT_QTGUI_LIBRARY and QT_USE_FILE are returning the paths to an older version of Qt, even though I have FIND_PACKAGE(Qt4 4.8.2 REQUIRED) at the top.
How do I go about fixing this?
Delete CMakeCache.txt in your build directory and generate again. Sometimes it's necessary to update CMakeCache.txt especially if you upgrade some sided library used by you in your project.

Resources