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
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();
}
> 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
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
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
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:
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
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
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
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();
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
11 matches
Mail list logo