@elfring openComPort() is called from a slot that's responding to a change in a selection from a QComboBox. This is just a mild safeguard against something going wrong in the selection. If anything, I probably should check that it resolves to a valid port name.
if I set context menu policy in this widget, it doesn't open context menu anyway.
I did it in QTreeWidget in the same application and it worked. Not here...
I subclassed a QMdiSubWindow.
In this window there are some boxes containing other widgets and finally in one of them there's a qcustomplot which occupies 80% of the whole subwiindow area.
I 've overriden the subwindow ::mousePressEvent(QMouseEvent *event) and here i check if right button is pressed: if so it opens that menu.
when user presses mouse button over a qcustomplot it triggers mousePressEvent(QMouseEvent *event) which reemits mouse press event and that's grabbed by my slot. when user presses mouse button over a different part of subwindow it triggers directly my slot .
when I have my context menu over qcustomplot if I click on a menu entry it correctly fires its lambda but it fires qcustomplot mousePressEvent(QMouseEvent *event) too.
As a workaround, does the (GDB) condition accept a function call, say, strcmp() or similar, or a cast, you could put up with? I'm not sure Qt Creator debugger is claiming to offer much over whatever GDB will accept?
This is not going to work... you're trying for the remote server (Github) to reach your Qt app in your internal LAN (host=192.168.56.1014) even the IP in that URL is not valid.
For this service to work, you need to forward the port (5900) of your machine running the Qt app to the external IP in your environment, and then point the service to such external IP + port
As @SGaist stated, you can always put the SVG item into a label or a button as its image.
Have you tried QSvgRenderer instead of loading the svg file into an image? You will need to add QT += svg to your PRO file and include <QSvgRenderer> in your file.
// Setup the painter to the QWidget (or use an image instead of a widget)
QPainter painter (this);
// Create the SVG object
QSvgRenderer renderer ("file.svg");
// Set the viewing box
renderer.setViewBox (painter.viewport ());
// Now set the scale or other transforms into the painter
// Render the image
The problem with going into an image is that it will create either a MEGA huge image or a small image or a normal image based on the SVG document size. Then, scaling this image you lose all the nice smoothing and crispness using an SVG gives you. It is best to scale the SVG to the size you need and not the other way around.
I actually load an SVG into an image like you are doing and use it as a background for painting. This is actually faster than drawing the SVG each time (for my case) and the image looks crisp since the SVG is scaled and not the image.
Well i find it nice you are willing to share so
its more that direct exe link will be blocked by many.
However, a link to download from webpage IS more normal and
should work for most.
This new thread is not helpful, given that you are asking the same question in the thread you link to, and @aha_1980 has started answering you there. I suggest for everyone's benefit you stick to one or the other thread for your question, otherwise people will be answering in both places....
I believe it is because I have to keep the highlightFollowsCurrentItem property to true. But if I change this I'll have trouble as soon as the ListView will scroll on the press of one button.
Here is what its looks like :
error: missing binary operator before token "(" #if QT_DEPRECATED_SINCE(5, 3)
Qt Creator code model “could not parse an included file” warning and errors in derived template classes: incomplete type 'QMetaObject' named in nested name specifier
The first one I fixed by renaming my header (and according cpp) files: system.h, process.h, filter.h. The second one was fixed after including into the project file the following variable: QT_OPENGL = desktop.
Yes, I am using my laptop to compile, and it has intel i7 2.2GHz with 4 cores and 8 logical processors. Well, basically I am using a dual boot, so the same hardware is applied for the working Linux version and non-working Windows version.