qt5

How to create qDebug signal from another thread to the Qt5 GUI thread

有些话、适合烂在心里 提交于 2020-05-14 12:13:22
问题 I am trying to display log messages from a work thread in a GUI. I am trying to follow redirect qDebug to QTextEdit It started to work fine, but I am stuck, how to program QObject::connect(otherThread, SIGNAL(debug(QString)), s_textEdit, SLOT(append(QString)), Qt::QueuedConnection); The principle I see, that one signal in the thread shall be connected to a slot in the GUI thread; but how to trigger that signal? Also, I make some logging with QDebug , but also some output to std::cerr . Can I

How to create qDebug signal from another thread to the Qt5 GUI thread

血红的双手。 提交于 2020-05-14 12:13:10
问题 I am trying to display log messages from a work thread in a GUI. I am trying to follow redirect qDebug to QTextEdit It started to work fine, but I am stuck, how to program QObject::connect(otherThread, SIGNAL(debug(QString)), s_textEdit, SLOT(append(QString)), Qt::QueuedConnection); The principle I see, that one signal in the thread shall be connected to a slot in the GUI thread; but how to trigger that signal? Also, I make some logging with QDebug , but also some output to std::cerr . Can I

Can't start a Program because Qt5Cored.dll is missing

房东的猫 提交于 2020-05-09 19:31:36
问题 I compiled a simple Qt 5 project successful in Qt Creator. When run from within Qt Creator it works. But when i transferred the executable into another location is produces the following error message on the cmd console; The program can't start because Qt5Cored.dll is missing from your computer. Try reinstalling the program to fix this program. I tried to find Qt5Cored.dll in the Qt5 directory could not find. But strange thing is the program runs from Qt Creator. Any help please. I'm on

How to force QT5 MediaPlayer to show Subtitles?

本小妞迷上赌 提交于 2020-05-09 14:01:27
问题 I am evaluating a migration from Qt 4.8 towards Qt 5.2 and the most important point is the multimedia backend. In Qt 5.2 there are some important features the Phonon backend in Qt 4.8 does not provide. But at least the elder version showed subtitles (SRT file in the same directory as the video file). Neither the documentation nor the trial-and-error provided me any results. So, does anyone know how to FORCE Qt 5 to show these subtitles? Or isnt it even supported (would be a shame) Any help is

Remove icon space from QMenu

非 Y 不嫁゛ 提交于 2020-05-08 03:17:07
问题 I'm working on a Qt application (in C++). Without appyling any styles, my menu looks like this: I'd like it to look like this: How do I achieve this? Either using qss, or programmatically? I already tried this, without success: menu->addAction(tr("Add"), this, SLOT(CreateNewWaypoint()))->setIconVisibleInMenu(false); Answers for both Qt4.8 and Qt5 are needed to get the full bounty! 回答1: One way to solve the problem is to use QProxyStyle: customstyle.h #ifndef CUSTOMSTYLE_H #define CUSTOMSTYLE

Remove icon space from QMenu

微笑、不失礼 提交于 2020-05-08 03:15:47
问题 I'm working on a Qt application (in C++). Without appyling any styles, my menu looks like this: I'd like it to look like this: How do I achieve this? Either using qss, or programmatically? I already tried this, without success: menu->addAction(tr("Add"), this, SLOT(CreateNewWaypoint()))->setIconVisibleInMenu(false); Answers for both Qt4.8 and Qt5 are needed to get the full bounty! 回答1: One way to solve the problem is to use QProxyStyle: customstyle.h #ifndef CUSTOMSTYLE_H #define CUSTOMSTYLE

Qt5 User Interface Compiler: -i option not available

独自空忆成欢 提交于 2020-04-18 05:59:12
问题 I created a .ui file (myform.ui) using QtDesigner and I would like to create the corresponding header (myform.h) and implementation (myform.cpp) file. Now I can create the header file (myform.h) with the following command on Linux: uic mainwindow.ui -o mainwindow.h An older answer on StackExchange (here) suggested using the following command to create the implementation file (myform.cpp): uic -i mainwindow.h -o mainwindow.cpp mainwindow.ui However, the command option -i doesn't seem to be

windeployqt doesn't deploy qwindowsd.dll for a debug application

拟墨画扇 提交于 2020-04-16 05:55:07
问题 I'm trying to use windeployqt.exe (Qt 5.13.2) to deploy dlls for a debug application generated by CMake 3.16. All the dlls are deployed correctly except for the platform plugin dll, which deploys qwindows.dll instead of qwindowsd.dll and results in the following error when I try to run the executable: This application failed to start because no Qt platform plugin could be initialized. So far, I've tried: Specifying --debug on the windeployqt command line. That failed because Qt5Coredd.dll

windeployqt doesn't deploy qwindowsd.dll for a debug application

左心房为你撑大大i 提交于 2020-04-16 05:55:05
问题 I'm trying to use windeployqt.exe (Qt 5.13.2) to deploy dlls for a debug application generated by CMake 3.16. All the dlls are deployed correctly except for the platform plugin dll, which deploys qwindows.dll instead of qwindowsd.dll and results in the following error when I try to run the executable: This application failed to start because no Qt platform plugin could be initialized. So far, I've tried: Specifying --debug on the windeployqt command line. That failed because Qt5Coredd.dll

Qt5 deployment “procedure entry point could not be located”

喜欢而已 提交于 2020-04-11 06:16:30
问题 What I have done: I'm on Windows 10 and my application is written in C++ / Qt 5.11.1 / MinGW 5.3.0. I compiled it with the release kit and I've run windeployqt from C:\Qt\5.11.1\mingw53_32\bin on it. It was still missing libgcc_s_dw2-1.dll and libwinpthread-1.dll , so I copied them from C:\Qt\Tools\mingw530_32\bin to the application directory as well. The error: Whenever I try to start up my app, I get the errors Procedure entry point _ZdlPvj could not be located in Qt5Sql.dll Procedure entry