call a function with a signal
-
QT Novice
I am following the official tutorials and making a few mods just for fun. Chapter Five creates a slider and LDC named lcd. It suggests that I set the mode to hex and binary with buttons. Did that. But when setting to binary, the number of digits should be increased. In the LCD that is the function call setNumDigits(), but it is not a slot. When the pushbutton named “set_binary” outputs SIGNAL( clicked() ), what might be done to manufacture the function call lcd->setNumDigits(8); -
Connect the signal with a custom slot written by you and call lcd->setNumDigits() in there.
-
I was thinking something along those lines. We are running QT 3 and everything about custom slots that I found is for QT 4 and later and says things have changed. I will be looking for this later in the QT3 Assistant that I am working now.
Thanks for the reply. -
-
-
Very good article ! Thanks !
-
@VRonin said in call a function with a signal:
@BKBK said in call a function with a signal:
We are running QT 3
😱
Any particular reason? There has been a massive architecture change between 3 and 4, I doubt you'll find much support for a 17 years old version
Yes, just looked into that. I work for the Air Force and have been told that the security team has found vulnerabilities in QT5 and 6 and will not allow its use. We are looking at QT4 but we have some 1600 source code files that use QT and that will take significant effort.
I do not know if anyone from that security team has been in touch with the QT people. -
@BKBK said in call a function with a signal:
Yes, just looked into that. I work for the Air Force and have been told that the security team has found vulnerabilities in QT5 and 6 and will not allow its use
They are pretty good ! They found vulnerabilities in a not yet started version of Qt ;-)
Jokes aside, do you know what version they analysed ? And did they contact the Qt Company so these can be fixed and would thus allow you to use a supported version ?
-
@SGaist
sorry about that error. No, I do not know if any contact has been made. I am down at the bottom of that totem pole. From my perspective, the decisions made by those that do that security/vulnerability checking affect all the Air Force developers (and many contractors), a large number of developers. They really don't care to hear from all those thousands of developers, each of whom has their own favorite tools.
They probably don't even want us to ask if that contact has been made, but I will query around here and see if anyone knows anything. -
@BKBK said in call a function with a signal:
the security team has found vulnerabilities
While I don't doubt they did, Qt is safe enough to get certified for use in many critical applications including medical: https://www.qt.io/functional-safety-and-qt