Re: [Interest] Most simple emit from singleton?

2019-11-13 Thread Jason H
Yeah, it's a global event. Like tracking volume key events on a phone. ;-) I guess anyone can trigger them but the platform is invoking them in the handler. And my app is not considered to be hostile to itself. > Sent: Wednesday, November 13, 2019 at 11:18 PM > From: "Jérôme Godbout" > To: "in

Re: [Interest] Most simple emit from singleton?

2019-11-13 Thread Jérôme Godbout
Q_EMIT and emit macro are blank indeed. I was under the impression, that this singleton was a global signal emiter where anybody could launch a signal class SingletonClass : QObject { Q_OBJECT public: void TriggerGlobalEvent() { myGlobalEvent(); } signals: void myGlobalEvent(); }

Re: [Interest] Most simple emit from singleton?

2019-11-13 Thread Jason H
> 3) While signals are technically public members, I'd consider that an > implementation detail; one should NEVER be emitting signals on behalf of > another arbitrary class. > > You should protect your signal emissions, e.g. use the same undocumented > trick that Qt uses (make them have an argument

Re: [Interest] Most simple emit from singleton?

2019-11-13 Thread Giuseppe D'Angelo via Interest
On 13/11/2019 18:11, Jason H wrote: Maybe. Couldn't I just call: MySingleton::Instance()->MySignal(); and skip emit altogether? I've read that Q_EMIT and emit are just syntactic sugar, and there is confusion in this stackexchange: https://stackoverflow.com/questions/10160476/using-emit-vs-calli

Re: [Interest] Rebuild QPA plugins

2019-11-13 Thread Benjamin TERRIER
Le mer. 13 nov. 2019 à 11:06, Benjamin TERRIER a écrit : > > Now I have: > > Cannot load library > /opt/Qt/5.13.2/gcc_64/plugins/platforms/libqxcb.so: > (/opt/Qt/5.13.2/gcc_64/plugins/platforms/libqxcb.so: undefined symbol: > _ZTI26QPlatformIntegrationPlugin, version Qt_5) > QLibraryPriva

Re: [Interest] XCB clipboard freeze

2019-11-13 Thread Benjamin TERRIER
Le mar. 5 nov. 2019 à 17:39, Thiago Macieira a écrit : > > Probably *because* events would be processed during the wait. We all know > nested event loops are bad design. In this case, this stems from another > bad > API design: the clipboard handled synchronously, when it clearly isn't. > > Note:

Re: [Interest] Most simple emit from singleton?

2019-11-13 Thread Jason H
Maybe. Couldn't I just call: MySingleton::Instance()->MySignal(); and skip emit altogether? I've read that Q_EMIT and emit are just syntactic sugar, and there is confusion in this stackexchange: https://stackoverflow.com/questions/10160476/using-emit-vs-calling-a-signal-as-if-its-a-regular-functi

Re: [Interest] QInputDialog as item delegate?

2019-11-13 Thread Max Paperno
Hi Matthew, I have this in a delegate and it seems to work well.  I don't know about "best way."  This one intercepts the double-click event which would typically open an editor. It could also work with a single click if you prefer (I personally found that annoying from a user perspective).  T

Re: [Interest] Most simple emit from singleton?

2019-11-13 Thread Jérôme Godbout
Why not declare a signals into your singleton header and call it directly? MySingleton.h class MySingleton { signals: void MySignals(); }; myOtherCode.cpp Q_EMIT MySingleton::Instance()->MySignals(); -Original Message- From: Interest On Behalf Of Jason H Sent: November 13, 2019 1

[Interest] Most simple emit from singleton?

2019-11-13 Thread Jason H
I've stumbled across a paradigm that I am starting to use frequently where I have a singleton, and I want it to emit something when I tell it to. So I've been providing a function and doing: MySingleton::instance()->emitMySignal(); Where: void MySingleton::emitMySignal() { emit mySignal();

Re: [Interest] Rebuild QPA plugins

2019-11-13 Thread Benjamin TERRIER
Le mer. 13 nov. 2019 à 07:12, Simon Matthews < simon.matth...@bluepearlsoftware.com> a écrit : > You don't need RHEL, just use CentOS. > > Have you tried setting the environment variable: > > export QT_DEBUG_PLUGINS=1 > > This might give you more information on the problem. > > You might have issu