Question GUI
-
Hi,
I am new to Qt and have a project I am working on.
I have a program that works in terminal, however I can see the best way to convert to GUI.
The program executes in a while loop and stops when there is a except keyboard interrupt and resets. The while loop is in a try except. What is the best way to change it to click press. The second part to this question is I have designed a tab GUI, as while the first program is running I need to do another task. I am not very good with multi threading.
Hope someone can advise me cheers -
@Newbbie1978 said in Question GUI:
Hello and welcome.The program executes in a while loop and stops when there is a except keyboard interrupt and resets. The while loop is in a try except. What is the best way to change it to click press.
Qt is event-driven, like many UI systems. That does not use "while loops" in the way you describe. You need to rewrite in an event-driven fashion. If you are lucky there will be "little to do", since effectively Qt is permanently running a "while loop" behind the scenes for you. Qt allows you to recognise and act on key press events if you want that.
Multi-threading is one of the hardest things to get right, and newbies often rush in where angels fear to tread. Again, you may not need to use any threading for this in Qt, though it does depend what this "other task" does. If you do need to use a separate "calculating" thread you can do so from Qt.
-
Hi JonB,
Thank you for the reply.
I have a ethical spoof toolkit project and was not how to execute then demonstrate another tool working along side it.