qt5

QProcess fails to execute a terminal line command via QPushButton

南笙酒味 提交于 2021-01-29 05:53:48
问题 I am trying to execute a command line using QProcess as soon as I push a QPushButton on my gui. The problem I have is that the .sh executable file is never executed. The script I am trying to execute is very simple and reported below: #!/bin/bash echo "try one two three" rostopic echo -b LaserScan_PointCloud2_test.bag -p /scan > laserScan_test_1.csv Below the function that activate the button: filterpcdinterface.h private slots: void on_executeScriptBtn_clicked(); private: QProcess

QProcess fails to execute a terminal line command via QPushButton

自作多情 提交于 2021-01-29 05:52:08
问题 I am trying to execute a command line using QProcess as soon as I push a QPushButton on my gui. The problem I have is that the .sh executable file is never executed. The script I am trying to execute is very simple and reported below: #!/bin/bash echo "try one two three" rostopic echo -b LaserScan_PointCloud2_test.bag -p /scan > laserScan_test_1.csv Below the function that activate the button: filterpcdinterface.h private slots: void on_executeScriptBtn_clicked(); private: QProcess

Static linking against Qt on Windows using CMake

无人久伴 提交于 2021-01-29 03:24:02
问题 I'm working on a Qt project that is developed on Linux, but also has a statically linked Windows build. I can build it on Linux and Windows using the same CMakeLists.txt file. It strips down to: project(muckturnier) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_REQUIRED TRUE) find_package(Qt5 COMPONENTS Widgets Sql) include_directories(${Qt5Widgets_INCLUDES} ${Qt5Sql_INCLUDES}) set(CMAKE_AUTOMOC ON) set(muckturnier_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/SomeCode.cpp) add_executable(muckturnier $

Static linking against Qt on Windows using CMake

烈酒焚心 提交于 2021-01-29 03:17:29
问题 I'm working on a Qt project that is developed on Linux, but also has a statically linked Windows build. I can build it on Linux and Windows using the same CMakeLists.txt file. It strips down to: project(muckturnier) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_REQUIRED TRUE) find_package(Qt5 COMPONENTS Widgets Sql) include_directories(${Qt5Widgets_INCLUDES} ${Qt5Sql_INCLUDES}) set(CMAKE_AUTOMOC ON) set(muckturnier_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/SomeCode.cpp) add_executable(muckturnier $

qspinbox64 build for windows

喜你入骨 提交于 2021-01-28 12:02:12
问题 In an earlier question, I was trying to create a QSpinBox64 class. After following the hints from the answer, the code worked on linux. However, when building on Windows, a number of errors occur: moc_qspinbox64.obj:-1: error: LNK2001: unresolved external symbol "public: static struct QMetaObject const QAbstractSpinBox::staticMetaObject" (?staticMetaObject@QAbstractSpinBox@@2UQMetaObject@@B) moc_qspinbox64.obj:-1: error: LNK2019: unresolved external symbol "public: static struct QMetaObject

QQuickWidget: grabToImage: item's window is not visible

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-28 11:00:48
问题 I'm having a problem when I try to use Item::grabToImage() qml method. No matter which item I point to, it always says the following error: grabToImage: item's window is not visible I tried using the root/toplevel Item named rect too, but it didnt work. My goal: I want to capture a rectangle sized image with the map tile and polygon draw on it Below there's a minimal reproducible example import QtQml 2.2 import QtLocation 5.9 import QtPositioning 5.9 import QtQuick 2.0 import QtQuick.Controls

Moving the cursor in a PyQt5 text edit doesn't work

喜夏-厌秋 提交于 2021-01-28 07:31:41
问题 I'm contributing to Frescboaldi, a PyQt5 application and experience problems interacting with the core text edit component. It seems whatever I try I can't get either of setPosition or movePosition to work. The code cursor.insertText("Hello") cursor.setPosition(cursor.position() - 5) properly inserts the text Hello in the document but leaves the cursor at the end of the inserted text (instead of moving it to the left by 5 characters). The first line proves that cursor, textedit and document

Process exit code 0xC0000135 while running Qt hello world

亡梦爱人 提交于 2021-01-28 05:31:37
问题 Here is my main.cpp code: #include <iostream> #include <QtWidgets/QApplication> #include <QtWidgets/QPushButton> using namespace std; int main(int argc, char *argv[]) { QApplication application(argc, argv); QPushButton button("Hello, world!"); button.show(); return application.exec(); } Running it in CLion IDE (latest version) gives me the following error: Process finished with exit code -1073741515 (0xC0000135) Here is my CMakeLists.txt : cmake_minimum_required(VERSION 3.13) project(simple

Changing Buffer Size of QMediaPlayer

怎甘沉沦 提交于 2021-01-28 04:02:20
问题 I have implemented a Videoplayer using Qt5.1 QMediaPlayer, however I would like to know if there is a way to control the buffer sizes for streaming media from a URL so as to cater for different connection speeds. In addition, is there a way to determine how much of the content being streamed has been completely downloaded. 回答1: The buffer size is based on the keyframes contained in the video track, the range between 2 keyframes defines the size of each buffered piece and as far as I know this

Changing Buffer Size of QMediaPlayer

别等时光非礼了梦想. 提交于 2021-01-28 03:48:28
问题 I have implemented a Videoplayer using Qt5.1 QMediaPlayer, however I would like to know if there is a way to control the buffer sizes for streaming media from a URL so as to cater for different connection speeds. In addition, is there a way to determine how much of the content being streamed has been completely downloaded. 回答1: The buffer size is based on the keyframes contained in the video track, the range between 2 keyframes defines the size of each buffered piece and as far as I know this