Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Kvaz1r
@Kvaz1r
found a mistake - I set another directory for output.
Nikita
@GoverLabs
Hi Texus. I've added saving/loading root form size to GuiBuilderState. You can find it in my PR. Please, let me know, if you want to change smth there.
Bruno Van de Velde
@texus
Thanks. I will try to look at the PR tomorrow
DJuego
@DJuego
Hi again!
When i set the value of the Knob component, the knob is not "refreshed" with the new value. A bug?
tgui::Knob::Ptr knob_orientation = m_gui.get<tgui::Knob>("Knob1");
knob_orientation->setValue(0);
DJuego
@DJuego
Yes. I can confirm that setValue works in other knobs. It is strange.
Bruno Van de Velde
@texus
@DJuego Did you set the minimum or maximum for that knob somewhere?
Does getValue() return the value that you passed to setValue()?
Did you try it with another value as well?
DJuego
@DJuego
Hi @texus. No . I don't set programatically the minimum/maximum. I use the TGUI editor with values minimun -180 and maximun +181. It works. The knob is responsive to events. I can move the dial as i expect.
No. getValue() returns the previous value. The setValue() is ignored.
Bruno Van de Velde
@texus
What are the values returned by getMinimum() and getMaximum()?
DJuego
@DJuego
tgui::Knob::Ptr knob_orientacion = m_gui.get<tgui::Knob>("Knob1");
knob_orientacion->setValue(33);
auto valor = knob_orientacion->getValue();
auto minimum = knob_orientacion->getMinimum();
auto maximum = knob_orientacion->getMaximum();
valor = -53
minimum = -180
maximum = 181
They are the expected values of maximum and minimum.
"valor" should be 33.
Bruno Van de Velde
@texus
Is there a callback function connected on value change? Is the value still wrong when executing knob_orientation->disconnectAll(); before setting the value?
DJuego
@DJuego
I have another knobs in the same program. It works perfectly with setValue(). The only difference is the size of the problematic knob. It is "big". Height/Width is 400. The parameters maximum and minimum are the same.
A second please.
Yes! I have debugged the callback function. That's probably the problem.
DJuego
@DJuego
Of course, that was the problem. Next time I will investigate deeply before I issue an alert around here. ;-) A series of fortuitous coincidences meant that in the other knobs the problem did not manifest itself. That's why I was perplexed.
Thank you very much, @texus.
Nikita
@GoverLabs
Hi Texus! Just want to say that tgui::Signals namespace is awesome! Finding correct signal name was a bit tricky and distracting.
DJuego
@DJuego
Hi again to all!!
I try to develop an application that uses TGUI for the graphical interface, and QtBluetooth.
Unfortunately it seems that there is some incompatibility.
DJuego
@DJuego
I am working in Windows 10 x64, Visual Studio 2017, Qt 5.13.1, TGUI from master.
DJuego
@DJuego
When i add: #include <QtBluetooth/qbluetoothsocket.h>
I get:
w:\archivos_de_programa\msvc2017\x64\tgui\include\tgui\signal.hpp(312): error C2059: syntax error: 'const'
1>w:\archivos_de_programa\msvc2017\x64\tgui\include\tgui\signal.hpp(313): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
1>w:\archivos_de_programa\msvc2017\x64\tgui\include\tgui\signal.hpp(452): error C2059: syntax error: 'const'
1>w:\archivos_de_programa\msvc2017\x64\tgui\include\tgui\signal.hpp(452): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
1>w:\archivos_de_programa\msvc2017\x64\tgui\include\tgui\signal.hpp(453): error C2059: syntax error: 'const'
1>w:\archivos_de_programa\msvc2017\x64\tgui\include\tgui\signal.hpp(453): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
1>w:\archivos_de_programa\msvc2017\x64\tgui\include\tgui\signal.hpp(454): error C2059: syntax error: 'const'
[...]
Bruno Van de Velde
@texus
@DJuego Does it work when you put the qbluetoothsocket include behind the TGUI include instead of infront of it?
DJuego
@DJuego
Yes, @texus
The problem seems to be that Qt defines a macro "emit".
Bruno Van de Velde
@texus
Yeah, you will either have to undefine emit before including TGUI or make sure Qt isn't included before TGUI
DJuego
@DJuego
I see. It would be interesting to document it, if it cannot be resolved.
In any case, this fix works for me for this program.
Bruno Van de Velde
@texus
Any macro from any external library will break code with the same names, I'm not sure if it is the job of TGUI to list these conflicts.
For the issue with windows.h I have code in TGUI that prevents the conflict, but I don't think I can solve this case with Qt in TGUI that way as it will prevent the user from actually using the emit from Qt if I undefine it
DJuego
@DJuego
I get it. Let's hope the solution is always that simple.
Thank you for your attention, @texus .
Bruno Van de Velde
@texus
The safest way to prevent issues with multiple libraries is always to put code that uses them in separate cpp files
In conflicts where swapping the include order doesn't work, that would be the solution
DJuego
@DJuego
I know what you mean. But I don't know if that's always feasible.
Tom Niget
@zdimension
Good afternoon, I'm using the .NET bindings for a C# program and I'm encountering some garbage collection problems; I'm trying to initialize all the GUI components in a separate method and for some reason this causes problems at runtime
It seems that the .NET GC is collecting some of the delegates used internally by some widgets, so I'm getting CallbackOnCollectedDelegate errors
Storing all the widgets in a list to take ownership of them or even GC.KeepAlive'ing them doesn't seem to make any change at all
Bruno Van de Velde
@texus
In case someone finds this issue later, the CallbackOnCollectedDelegate issue has been fixed in TGUI.Net 0.8.3.11