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. How to save TextBox's Input in List or Variable ?

How to save TextBox's Input in List or Variable ?

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 2 Posters 858 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.
  • E Offline
    E Offline
    elias_hh
    wrote on 18 Jun 2020, 09:37 last edited by
    #1

    Hey Guys,

    i have a code that filters the parameters for the calculation of a rectangle from the image name. However, sometimes the user may name the name according to the wrong nomenclature. This means that the program cannot filter the necessary parameters. Therefore it shows a question mark, as shown in the picture.

    Unbenannt.PNG

    My goal is to give the user the possibility to manually enter the unrecognized parameter. I am new to PyQt5 and wanted to ask if this is possible ?

    for example like that ?:

    param_height[index] = self.lineEdit.NewTextInput()

    Is there any possibility to to that ?

    J 1 Reply Last reply 18 Jun 2020, 09:40
    0
    • E elias_hh
      18 Jun 2020, 09:37

      Hey Guys,

      i have a code that filters the parameters for the calculation of a rectangle from the image name. However, sometimes the user may name the name according to the wrong nomenclature. This means that the program cannot filter the necessary parameters. Therefore it shows a question mark, as shown in the picture.

      Unbenannt.PNG

      My goal is to give the user the possibility to manually enter the unrecognized parameter. I am new to PyQt5 and wanted to ask if this is possible ?

      for example like that ?:

      param_height[index] = self.lineEdit.NewTextInput()

      Is there any possibility to to that ?

      J Online
      J Online
      jsulm
      Lifetime Qt Champion
      wrote on 18 Jun 2020, 09:40 last edited by
      #2

      @elias_hh said in How to save TextBox's Input in List or Variable ?:

      My goal is to give the user the possibility to manually enter the unrecognized parameter

      Not sure I understand. Can't the user simply edit in the line edit?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      E 1 Reply Last reply 18 Jun 2020, 09:51
      1
      • J jsulm
        18 Jun 2020, 09:40

        @elias_hh said in How to save TextBox's Input in List or Variable ?:

        My goal is to give the user the possibility to manually enter the unrecognized parameter

        Not sure I understand. Can't the user simply edit in the line edit?

        E Offline
        E Offline
        elias_hh
        wrote on 18 Jun 2020, 09:51 last edited by
        #3

        @jsulm thank you for your respons,

        The example I have given is a simplification. The actual application is a very complicated nomenclature. And it is time-consuming for the user to search and type in the parameters from the nomenclature. That is why this should happen automatically.

        In the rare case that the code does not find any parameters, only then the user must remove the question mark (as shown in the picture) with his hand and type in the correct parameter. And this new parameter should then be saved immediately in the list of parameters.

        In the picture you can see that a question mark is displayed in a LineEedit. To be smiple: I would like the user to type in this LineEdit a 10 and then save this 10 in a variable.

        J 1 Reply Last reply 18 Jun 2020, 09:53
        0
        • E elias_hh
          18 Jun 2020, 09:51

          @jsulm thank you for your respons,

          The example I have given is a simplification. The actual application is a very complicated nomenclature. And it is time-consuming for the user to search and type in the parameters from the nomenclature. That is why this should happen automatically.

          In the rare case that the code does not find any parameters, only then the user must remove the question mark (as shown in the picture) with his hand and type in the correct parameter. And this new parameter should then be saved immediately in the list of parameters.

          In the picture you can see that a question mark is displayed in a LineEedit. To be smiple: I would like the user to type in this LineEdit a 10 and then save this 10 in a variable.

          J Online
          J Online
          jsulm
          Lifetime Qt Champion
          wrote on 18 Jun 2020, 09:53 last edited by
          #4

          @elias_hh You could show a dialog and ask user to enter a value there (inside dialog) if it is not possible to extract the value automatically.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          1/4

          18 Jun 2020, 09:37

          • Login

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