qt5

Set CullFace to Front and Back in Qt3D in Python via PySide2

梦想与她 提交于 2021-02-20 05:13:37
问题 I wanted to set QCullFace to FrontAndBack and that is why I wrote this: from PySide2.Qt3DRender import Qt3DRender cull_face = Qt3DRender.QCullFace() cull_face.setMode(Qt3DRender.QCullFace.FrontAndBack) render_pass = Qt3DRender.QRenderPass() render_pass.addRenderState(cull_face) The code above should set CullFace globally. But it does not. What did I do wrong? 回答1: I assume that the python binding does not change how Qt works in C++. So you probably have a Qt3DWindow somewhere (unless you

Set CullFace to Front and Back in Qt3D in Python via PySide2

风流意气都作罢 提交于 2021-02-20 05:13:07
问题 I wanted to set QCullFace to FrontAndBack and that is why I wrote this: from PySide2.Qt3DRender import Qt3DRender cull_face = Qt3DRender.QCullFace() cull_face.setMode(Qt3DRender.QCullFace.FrontAndBack) render_pass = Qt3DRender.QRenderPass() render_pass.addRenderState(cull_face) The code above should set CullFace globally. But it does not. What did I do wrong? 回答1: I assume that the python binding does not change how Qt works in C++. So you probably have a Qt3DWindow somewhere (unless you

QProcess: not receiving finished() signal running Powershell script

[亡魂溺海] 提交于 2021-02-20 04:36:01
问题 I am developing a Qt application that, among other things, converts an Excel spreadsheet in a text delimited with tab file. This is done by running a Windows Powershell script. My problem is that the finished() signal from the QProcess is never emitted, although the conversion is done successfully. And yes, I receive stateChanged() signal. Powershell script (ps_excel.ps1) (adapted from this question) param ([string]$ent = $null, [string]$sal = $null) $xlCSV = -4158 #value for tab delimited

QProcess: not receiving finished() signal running Powershell script

痴心易碎 提交于 2021-02-20 04:34:07
问题 I am developing a Qt application that, among other things, converts an Excel spreadsheet in a text delimited with tab file. This is done by running a Windows Powershell script. My problem is that the finished() signal from the QProcess is never emitted, although the conversion is done successfully. And yes, I receive stateChanged() signal. Powershell script (ps_excel.ps1) (adapted from this question) param ([string]$ent = $null, [string]$sal = $null) $xlCSV = -4158 #value for tab delimited

QProcess: not receiving finished() signal running Powershell script

六月ゝ 毕业季﹏ 提交于 2021-02-20 04:34:06
问题 I am developing a Qt application that, among other things, converts an Excel spreadsheet in a text delimited with tab file. This is done by running a Windows Powershell script. My problem is that the finished() signal from the QProcess is never emitted, although the conversion is done successfully. And yes, I receive stateChanged() signal. Powershell script (ps_excel.ps1) (adapted from this question) param ([string]$ent = $null, [string]$sal = $null) $xlCSV = -4158 #value for tab delimited

Qt Virtual Keyboard in QQuickWidget

夙愿已清 提交于 2021-02-19 06:23:08
问题 It is possible to show Virtual Keyboard in QQuickWidget or in QWidget? I have QWidget application and I need to have better control where VirtualKeyboard is shown. Today I spend all my day to find a solution, unfortunately without success. 回答1: The following code shows that it is valid to use virtualkeyboard in QQuickWidget. main.cpp #include <QApplication> #include <QQmlApplicationEngine> #include <QQuickWidget> int main(int argc, char *argv[]) { qputenv("QT_IM_MODULE", QByteArray(

Qt5 linux how to set window icon image

会有一股神秘感。 提交于 2021-02-19 04:01:29
问题 I have a UI I have designed in Qt designer and have written the code in c++. I am using catkin, which is just cmake, to build my project. Currently when the program is launched, the application icon looks like, .I would like to have that be an image that I specify, but have been unable to figure out how to get this to work. My project directory structure looks like the following package |--CMakeLists.txt |--src |--main.cpp |--MainWindow.cpp |--resources |--images |--kitty.png |--icons.qrc |-

QAbstractVideoSurface example

这一生的挚爱 提交于 2021-02-19 01:46:05
问题 I'm trying to make myself a QML Camera item which has more functions, and also provide a source to the VideoOutput element. Such as this: VideoOutput{ source:mycamera } MyCustomCamera{ id:mycamera } in the document it says If you are extending your own C++ classes to interoperate with VideoOutput, you can either provide a QObject based class with a mediaObject property that exposes a QMediaObject derived class that has a QVideoRendererControl available, or you can provide a QObject based

How to update/redraw QChart after data is added to QLineSeries?

依然范特西╮ 提交于 2021-02-18 22:09:05
问题 I am generating some data that I want to chart using QChart & friends. This is my first time using QChart , and so basically what I did was copy the QLineSeries Example and modify it to my needs. My current code looks like this: quint64 last=0; quint64 *lastp=&last; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) , series( nullptr ) { ui->setupUi(this); QChart *chart = new QChart(); series=new QLineSeries(chart); chart->legend()->hide(); chart->addSeries

How to update/redraw QChart after data is added to QLineSeries?

不打扰是莪最后的温柔 提交于 2021-02-18 22:01:36
问题 I am generating some data that I want to chart using QChart & friends. This is my first time using QChart , and so basically what I did was copy the QLineSeries Example and modify it to my needs. My current code looks like this: quint64 last=0; quint64 *lastp=&last; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) , series( nullptr ) { ui->setupUi(this); QChart *chart = new QChart(); series=new QLineSeries(chart); chart->legend()->hide(); chart->addSeries