qt5

Onscreen Keyboard in Qt 5

廉价感情. 提交于 2019-12-18 10:58:06
问题 I want to create a onscreen keyboard for a desktop application. The application will be built in Qt 5. I have couple of questions, please clarify them. What is the replacement of QInputContext in Qt5? (Because I read somewhere about onscreen keybord by implementing QInputContext but this is not supported by Qt 5.) Where can I find QPlateformInputContext & QInputPanel (on an internet search I found these two as alternatives of QInputContext but not sure about that and also I was unable to find

No default repositories in Qt Maintenance Tool

对着背影说爱祢 提交于 2019-12-18 10:53:17
问题 I recently installed Qt 5.5 and its MaintenanceTool (MaintenanceTool.exe). The default repositories were working, but after one day, my MaintenanceTool suddenly reports that no repositories were set? I can temporaryly enter individual repositories in the MaintenanceTool, but I would like to get the default repos set. Why are they gone? How can I set the default repositories again? Thanks in advance 回答1: The Maintenance Tool is doing crazy things since the recent updates made by Qt team. The

Qt Creator, ptrace: Operation not permitted. What is the permanent solution?

岁酱吖の 提交于 2019-12-18 10:03:33
问题 While debugging C++ code in Qt creator I get the following error ptrace: Operation not permitted. Could not attach to the process. Make sure no other debugger traces this process. Check the settings of /proc/sys/kernel/yama/ptrace_scope For more details, see /etc/sysctl.d/10-ptrace.conf Here a temporary solution is found: Receiving error while trying to debug in QtProject temporary solution (won't survive a reboot): echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope But it is difficult to

qtcreator Qt_5 not found

房东的猫 提交于 2019-12-18 09:01:51
问题 Hello I have a problem starting qtcreator under Ubuntu 16.04. The reported error is: qtcreator: /usr/bin/../lib/x86_64-linux-gnu/qtcreator/../libQt5Gui.so.5: version `Qt_5_PRIVATE_API' not found (required by /usr/lib/libQt5Widgets.so.5) qtcreator: /usr/bin/../lib/x86_64-linux-gnu/qtcreator/../libQt5Gui.so.5: version `Qt_5' not found (required by /usr/lib/libQt5Widgets.so.5) I tried different solutions from other threads but can't make it. Can anyone help or explain what exactly the problem is

Fatal error when compiling Qt in Windows

旧城冷巷雨未停 提交于 2019-12-18 08:57:23
问题 I tried to build Qt 5.0.1 with MSVS2010 in Windows 7. These are my steps: Extract source code into C:\Qt\5.0.1 Start VS2010 command prompt Type configure (this step took approximately 45 minute) Type nmake After an hour I get the following error: "C:\Program Files (x86)\Microsoft DirectX SDKUtilities\bin\x86\fxc.exe" /nologo /E standardvs /T vs_2_0 /Fh shaders\standardvs.h ..\..\..\3rdparty\angle \src\libGLESv2\shaders\Blit.vs 'C:\Program' is not recognized as an internal or external command,

How to declare New-Signal-Slot syntax in Qt 5 as a parameter to function

一世执手 提交于 2019-12-18 08:08:30
问题 How can I pass signal or slot (member-function, new syntax in Qt 5) as a parameter to function and then call connect ? e.g. I want to write a function that waits for a signal. Note : It is not compile - PointerToMemberFunction is my question. bool waitForSignal(const QObject* sender, PointerToMemberFunction??? signal, int timeOut = 5000/*ms*/) { if (sender == nullptr) return true; bool isTimeOut = false; QEventLoop loop; QTimer timer; timer.setSingleShot(true); QObject::connect(&timer,

The procedure entry point could not be located in dynamic link library

孤人 提交于 2019-12-18 06:20:52
问题 I have the following error when open my application. I'm use windows 7 32bit platform, and Qt v5.3.1 with MinGW 4.8.2 - 32bit compiler . All dll's files with Qt5Core.dll for 5.3.1 version already exists . I don't know how to solve this problem. 回答1: Probably you get this error because you use dlls from QtCreator directory which was not compiled with mingw (often QtCreator compiled with Microsoft visual studio on Windows) You should use dlls from C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin (for example

How do I make a gradient opacity in an image?

て烟熏妆下的殇ゞ 提交于 2019-12-18 05:18:11
问题 How do I make an image fade in qml? How do I achieve this effect? here I attach the image of how I want it to look 回答1: A possible solution is to use OpacityMask with a LinearGradient as source import QtQuick 2.9 import QtQuick.Window 2.2 import QtGraphicalEffects 1.0 Window { visible: true width: 600 height: 600 title: qsTr("Hello World") Image { id: input source: "input.jpg" anchors.fill: parent OpacityMask { source: mask maskSource: input } LinearGradient { id: mask anchors.fill: parent

qtcreator - exe does work fine inside qtcreator but doesn't outside

天涯浪子 提交于 2019-12-18 03:45:36
问题 I want to give a friend of mine a release build of a little project. It works perfectly fine when started from inside qtcreator, but doesn't open when double-clicked on the .exe file. It doesn't even give me an error message. Now when I tried to copy a few Qt .dll files (like Qt5Core.dll, Qt5Gui.dll, Qt5Widgets.dll) next to my exe file, it didn't change anything. How can I know what dependencies my project has? The .pro file doesn't tell me so much QT += core gui greaterThan(QT_MAJOR_VERSION,

qt mysql驱动问题解绝

让人想犯罪 __ 提交于 2019-12-18 03:42:45
传统解决方法: 一、解决问题   本文解决在Ubuntu16.04系统下,Qt5无法连接MySQL数据库的问题(Qt5缺少MySQL驱动,Qt5缺少libqsqlmysql.so动态库,如何安装libqsqlmysql库,如何用Qt5源码编译生成libqsqlmysql库) 二、问题现象   编译运行Qt连接MySQL数据库程序的时候,控制台会报如下错误:   QSqlDatabase: QMYSQL driver not loaded   QSqlDatabase: available drivers: QSQLITE QMYSQL,Q…..等 三、问题原因   用Qt连接MySQL,Qt会去加载libqsqlmysql.so动态库,如果加载不到或者加载的库有问题,都会导致Qt提示driver not loaded。   (1)加载不到:Qt安装目录下的sqldrivers目录中没有libqsqlmysql.so文件(我的路径:/home/ubuntu/Qt5.8.0/5.8/gcc_64/plugins/sqldrivers)   (2)库有问题:进入Qt的sqldrivers目录,执行“ldd libqsqlmysql.so”命令,会出现“libmysqlclient_r.so.16 => not found”等等not found提示,如下图: 四、解决方法 思路