There is no straightforward API for this. I see several possibilities:
custom painting in QQuickPaintedItem
custom painting in QQuickItem
custom painting via GL shaders
custom painting in QML Canvas
a set of 4 animated Rectangle components, simulating the line. An ugly solution, but probably the easiest to do
Perhaps BorderImage component can be forced to do an animation like that, but I doubt it.
Hi and welcome
Is there a reason you simply dont use a layout ?
To make it autofollow the size of window ?
if you place a QLabel on a form ( mainwindow.ui) , right click somewhere on
empty form, and select Layout menu and select layout, the label will follow maniform. https://doc.qt.io/qt-5.10/examples-layouts.html
I think that the g++ version is what is doing it. The old version of rasbian
is using g++ v4.9.2. The new version of rasbian is using g++ v6.3.0-18+.
For the old compiler we had had to add an "INCLUDEPATH =
/usr/include" line into the .pro file to get everything picked up
properly. For the new compiler (and the change from #include to #include_next
in cstdlib) that messes up.
I'm removing the INCLUDEPATH, (which seems to have been included as -isystem
instead of -I) and that is fixing the problem.
Thank you, @SGaist, I followed you advise and community helped to find a solution.
The way is simple:
Open ssh session to remote host with X forwarding enabled ssh -X user@host. And get know the DISPLAY variable. For example with echo $DISPLAY. It should look like localhost:10.0.
Set environment variable DISPLAY in QtCreator -> Projects -> YourConfiguration -> Run -> RunEnvironment to known value from (1).
Run and enjoy remote debug with GUI on local machine.
Note: closing ssh session will make forwarded display inaccessible and invalid.
@SGaist Your comment was very helpful. I checked the contents by printing them and saw that when I called the process, the file was still being written (since I write a JSON file from the GUI). So I added one more line QFile.close() and now the python script is called only after JSON gets written from the GUI. Now it is running fine.
@Lasith Well, emit a signal, pass the current value to it as parameter. Connect the signal to the slot.
// somewhere in your code
connect(this, SIGNAL(mySignal(int)), otherObject, SLOT(mySlot(int)));
for (int i = 0; i < 10; ++i)
// In the other class
void MyObject::mySlot(const int value)
// Do something
Actually you should think about the need of signals and slots in this particular case - maybe it will be much easier and faster to directly call a method from the other class instead of emitting a signal? Signals/slots are useful if you want to have loose coupling, so the sender does not need to know anything about receiver.