qt5

OpenGL/ES 2.0 and Higher: How to Compile Multiple Shader Files Together

╄→гoц情女王★ 提交于 2019-12-25 03:42:56
问题 This question has been asked multiple times in different ways. My question is specific to OpenGL 2.0 / GLSL 1.10 and higher and potential compatibility with OpenGL ES 2.0 and its supported version of GLSL: What are recommended C/C++ APIs used to combine multiple files into one shader source to pass into glShaderSource. For example, if I have 3 files A.frag, B.frag, C.frag that have the following contents: /* A.frag */ struct A { vec3 val; }; /* B.frag */ struct B { vec3 val; }; /* C.frag */

OpenGL/ES 2.0 and Higher: How to Compile Multiple Shader Files Together

扶醉桌前 提交于 2019-12-25 03:42:32
问题 This question has been asked multiple times in different ways. My question is specific to OpenGL 2.0 / GLSL 1.10 and higher and potential compatibility with OpenGL ES 2.0 and its supported version of GLSL: What are recommended C/C++ APIs used to combine multiple files into one shader source to pass into glShaderSource. For example, if I have 3 files A.frag, B.frag, C.frag that have the following contents: /* A.frag */ struct A { vec3 val; }; /* B.frag */ struct B { vec3 val; }; /* C.frag */

Qt 5.3.1 application error: Could not find or load the Qt platform plugin “windows”

て烟熏妆下的殇ゞ 提交于 2019-12-25 03:35:22
问题 Precompiled Qt 5.3.1 with dynamic libraries, MinGW 32, Windows 8.1 x64 The deployed application cannot start on another computer giving the error: Could not find or load the Qt platform plugin "windows" 回答1: Solved by copying DLL from Qt's folder to ../MyApp/platforms/qwindows.dll. Note: there is no "plugins" directory in path 来源: https://stackoverflow.com/questions/25012347/qt-5-3-1-application-error-could-not-find-or-load-the-qt-platform-plugin-windo

__do_global_ctors segfault somewhere in project, cant locate it

这一生的挚爱 提交于 2019-12-25 02:47:37
问题 I migrated a project from Qt4 to Qt5, and it compiles and everything but the application crashes before it even reaches the main function. I know there is a null value that fucks up something at some point, maybe a file that cant find or something, but there are so many .cpps and .h and libraries that its pretty hard to locate the source of the error plus I cant set any breakpoints. I have a lot of debugging data so maybe any of you can guide me in the right direction. I dont know what I

Pass instance of class to a another constructor that adds its object to a list owned by passed instance

北慕城南 提交于 2019-12-25 02:36:27
问题 As the title says I want to create an object of class Note and add its pointer to a list of the object of class Traymenu. I am missing the whole thing I guess, please take a look on how I call the Note's constructor in traymenus's newNote and what I am doing in note.h. traymenu.h: #ifndef TRAYMENU_H #define TRAYMENU_H #include <QSystemTrayIcon> #include <QIcon> #include <QPixmap> #include <QMenu> //in use for context menu #include <QList> #include "note.h" class Traymenu : public

Is is possible to edit an individual Widget in the QtDesginer?

左心房为你撑大大i 提交于 2019-12-25 01:36:46
问题 I got a external library, which includes a derived class from QGLWidget, very similar to that one here. In that library I have a class: class PictureGLWidget : public QGLWidget { //.. } This extends Qt's native QGLWidget and personalizes it. But it was not written by me, I just got it, via a *.dll. So then, I bind that Widget manually in my code to a layout like: QGridLayout* layout = new QGridLayout; layout->addWidget(myPictureGLWidget, 0, 1); ui->verticalLayout_5->addLayout(layout); since I

How can I pin-point the location of the call in my code that triggered QObject::connect: Cannot queue arguments of type in Qt5?

本秂侑毒 提交于 2019-12-25 01:00:09
问题 In my Qt5 application, I am receiving a log message at run time from Qt itself that looks like this: QObject::connect: Cannot queue arguments of type 'QHostAddress' I know how to fix the cause of this message using Q_DECLARE_METATYPE(QHostAddress) macro or qRegisterMetaType<QHostAddress>("QHostAddress") class, that is not what this question is about. What I want to know is, how can I pin-point the exact location of the call in my code that triggered this message ? Since the message does not

I don't want the QDockwidget to resize when I dynamically add a toolbutton to QMainWindow's mainToolBar

烈酒焚心 提交于 2019-12-25 00:18:37
问题 Each time I dynamically add a button to the mainToolBar of a QMainWindow, the QDockWidget resizes to its original size. My question: Can I prevent the QDockWidget from auto resizing and how do I do this? If I cannot do that what other options are open to me? 'resizeDocks' perhaps? This is an illustration of my dilemma. This is a sample app on startup: Now I manually resize the QDockWindow. Now I press 'F1' which creates a toolbutton on QMainWindow's mainToolBar and the QDockWindow auto

update does not call paintEvent? [closed]

断了今生、忘了曾经 提交于 2019-12-24 23:28:49
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 months ago . `I retrieved the position of the mouse cursor and I want to draw a line by paintevent but is not called by update so nothing is happening .cpp void MainWindow::mousePressEvent(QMouseEvent * event) { if(event->button() == Qt::LeftButton) { if(mFirstClick) { mStartX = event->x(); mStartY = event->y(); mFirstClick