Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Question GUI
Qt 6.11 is out! See what's new in the release blog

Question GUI

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 2 Posters 385 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Newbbie1978
    wrote on last edited by
    #1

    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

    JonBJ 1 Reply Last reply
    0
    • N Newbbie1978

      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

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @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.

      1 Reply Last reply
      2
      • N Offline
        N Offline
        Newbbie1978
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved