qmake

超详细Linux下QT使用appimage打包程序

我怕爱的太早我们不能终老 提交于 2019-11-30 02:12:14
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 本文链接:https://blog.csdn.net/kuer1379/article/details/82885810 一 打包工具 1.linuxdeployqt 下载地址:https://github.com/probonopd/linuxdeployqt/releases 2.patchelf 下载地址:https://nixos.org/releases/patchelf/patchelf-0.9/patchelf-0.9.tar.gz 二 配置linuxdeployqt 1.点击点击下载linuxdeploy-continuous-x86_64.AppImage 2.然后执行如下代码,将改名字后的linuxdeployqt移动到 /usr/local/bin目录下 sudo mv linuxdeployqt-continuous-x86_64.AppImage linuxdeployqt sudo mv ./linuxdeployqt /usr/local/bin chmod 777 linuxdeployqt sudo linuxdelpoyqt --version linuxdeployqt 4 (commit 988d294), build 481 built

cmake not working, could not exec qmake

核能气质少年 提交于 2019-11-29 22:46:28
I am using Ubuntu 14.04. I'm trying to install a program which requires cmake. When I run cmake src/ I get: qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory What am I doing wrong? Does the trick: sudo apt-get install qt4-qmake You do not need to install half a gigabyte of qt sdk! Alexandre Holden Daly I read on another post that the problem has something to do with CMake not being able to find Qt4 qmake. However in my case, it was simply a matter of not having qt4-qmake. This solved it (but weighs a heavy 440MB): sudo apt-get install qt-sdk For newer

In Linux how to add a build step in Qt Creator that uses su privileges without getting the wrong password attempts on builds?

左心房为你撑大大i 提交于 2019-11-29 21:25:55
问题 My goal is to successfully link a folder to /opt/ directory- which needs to be run with sudo. I have tried this: system(sudo ln -s $$OUT_PWD/xampp /opt/lampp):message("You should manually link LAMPP") But building from qt-creator it does not prompt for sudo password, therefore I couldn't get it to link the folder. I got the "wrong password attempts..." error in the Compiler Output. Then I tried these with build steps: make sudo make install to see if it would prompt me there, but it failed on

How do I use qmake to build multiple binaries in a single project?

南笙酒味 提交于 2019-11-29 21:03:15
I'm writing a small qt app suite that consists of a set of small programs that work on the same set of files. They are organized like this: / app1/ main.cpp app2/ main.cpp app3/ main.cpp common/ project.h project.cpp somemore.h somemore.cpp appsuite.pro When I do qmake && make , I want the following binaries to be built: app1/app1 app2/app2 app3/app3 How do I write appsuite.pro to work like this? I have heard something about .pri files, but I could not figure out how to use them in my "situation". Help appreciated, jrh One way of doing it is to have a .pro file per subdirectory. appsuite.pro:

qMake: How exactly does qmake interpret the “CONFIG(debug, debug|release)” syntax

こ雲淡風輕ζ 提交于 2019-11-29 20:46:29
I read though HERE , yet I still don't understand the syntax of the qmake CONFIG variable. for example, if I have the following CONFIG settings in my .pro file : CONFIG(debug, debug|release) { message("debug mode") }else { message("release mode") } then, when running qmake , the following will be displayed in the Compile Output in Qt-Creator: Project MESSAGE: debug mode Project MESSAGE: debug mode Project MESSAGE: release mode knowing that I am building my project in a "debug mode" , then my questions are: why not showing the "debug mode" message only ? and why not showing it just once ? Then,

qmake: could not find a Qt installation of ''

淺唱寂寞╮ 提交于 2019-11-29 20:13:07
I have a software in ubuntu that requires me to run qmake to generate the Makefile. However, running qmake gives back this error, qmake: could not find a Qt installation of '' I have installed what I thought to be the required packages using, sudo apt-get install qt4-qmake sudo apt-get install qt5-qmake But the error didn't go away. Any help on this would be gladly appreciated! sudo apt-get install qt5-default works for me. $ aptitude show qt5-default tells that This package sets Qt 5 to be the default Qt version to be used when using development binaries like qmake. It provides a default

error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64

荒凉一梦 提交于 2019-11-29 20:10:12
问题 I am trying to install Qt in my CentOS system. While building the library, I'm getting this error: /root/capture/qt-everywhere-opensource-src-4.7.0/bin/qmake: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64 /root/capture/qt-everywhere-opensource-src-4.7.0/bin/qmake: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64 回答1: It seems the softlink of the libstdc++.so.6 has been changed and is pointing to libstdc++.so.6.0.13 (64-bit?)

Embedding Python3 in Qt 5

不羁的心 提交于 2019-11-29 19:09:33
问题 I would like to embed Python interpreter 3.4 into a Qt 5.2.1 application (64-bit). However I'm having build issues, I mean when I include Python header in the main.cpp it compiles fine. #include <python.h> #include "mainwindow.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); } but when I put it anywhere else (after Qt headers) // // embedpytest.cpp // #include <QLibrary> #include <python.h> EmbedPyTest:

qmake: how to supply multiple variables via command-line?

好久不见. 提交于 2019-11-29 18:58:01
问题 qmake allows to supply a variables via a command-line interface like this: qmake "CONFIG += release" "MY_VAR = hello" So i can use $$MY_VAR inside a .pro file. But is it possible to suply more than one variable such way? I have tried qmake "CONFIG += release" "MY_VAR = hello" "MY_ANOTHER_VAR = hi" But it did not work (raises error). Any hints? 回答1: The question is misleading. You CAN supply any number of variables. .pro file: .... message($$VAR1) message($$VAR2) qmake run: qmake ... "VAR1

QMake: Automatically compiling all files in a directory

♀尐吖头ヾ 提交于 2019-11-29 16:46:09
问题 For my Qt project, I use a .pro file that includes a separate .pri file for the various header, source, form and resource files. However, every time I add a new file I need to manually add it to the .pri file. This is tedious and error-prone. Is there a way to "magically" add all files from a directory, either directly in the .pri file or by telling qmake to run a separate script beforehand? 回答1: Running qmake -project from the directory will create a project file that includes all the .cpp