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 ?
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 2 Posters 942 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 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 ?

    jsulmJ 1 Reply Last reply
    0
    • E elias_hh

      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 ?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on 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
      1
      • jsulmJ jsulm

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

        jsulmJ 1 Reply Last reply
        0
        • E elias_hh

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

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on 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

          • Login

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