How to detect the button press in GUI for optional mode in GUI
-
I have seperated my application in two parts (GUI and Core).
so that I can run my application in both mode GUI mode and Non-GUI mode.
I have one form which is having one button (which I will launch in GUI mode of application).
I have one button as I described above which is in my core part.
When I tried to do the button press in core part I want that same to be reflected in my GUI part.
But the reflection in GUI part should be optional.
-
I have seperated my application in two parts (GUI and Core).
so that I can run my application in both mode GUI mode and Non-GUI mode.
I have one form which is having one button (which I will launch in GUI mode of application).
I have one button as I described above which is in my core part.
When I tried to do the button press in core part I want that same to be reflected in my GUI part.
But the reflection in GUI part should be optional.
Is your
ButtonClasseven aQPushButtonor what kind of class is this?So your problem is that you have your virtual button in non-GUI mode, which sets a variable when you trigger it and you dont know how to do this with a "real" pushbutton in GUI mode?!
-
@Pl45m4 My problem is if i press virtual button how It will enable in real button in GUI. (In Gui mode)
-
@Pl45m4 My problem is if i press virtual button how It will enable in real button in GUI. (In Gui mode)
-
@Pl45m4 But problem is here my core non-virtual button is seperated by GUI.
And I will not create instance of GUI for non-gui mode. -
@Pl45m4 But problem is here my core non-virtual button is seperated by GUI.
And I will not create instance of GUI for non-gui mode.@Ayush-Gupta said in How to detect the button press in GUI for optional mode in GUI:
And I will not create instance of GUI for non-gui mode.
So what? In this case you do not connect signals/slots...
-
@jsulm That seems to static compilation than ? Can you give some example?
-
@jsulm That seems to static compilation than ? Can you give some example?
@Ayush-Gupta What static compilation? What examples? How to connect a signal to a slot?
You know when you run with GUI and when without, right? If you run with GUI then connect signal/slot. -
I am not getting how can I have reference of core (non-virtual button) in GUI so that I can use signal/slot
-
how the slot/signal will help if I call virtual button enabled function ? In that I am only setting variable bEnabled ??
How can I map the core non- virtual button with real gui button?
-
Hi,
It seems you have a design issue here. From the looks of it you should rather implement some IPC for your console application which seems to act a bit like a daemon. With that then you can pilot it with your GUI or from somewhere else.