Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Enter points coordinates and generate it by pushing button
QtWS25 Last Chance

Enter points coordinates and generate it by pushing button

Scheduled Pinned Locked Moved Unsolved Qt 6
9 Posts 3 Posters 771 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.
  • C Offline
    C Offline
    Christin
    wrote on last edited by
    #1

    Hello!
    I'm beginner and that's why I need your help((
    I made dialog window like this and I want generate inputting data, but I don't know how...
    I think about using QVector3D, can you help me please?

    Untitled.jpg

    jsulmJ 1 Reply Last reply
    0
    • C Christin

      Hello!
      I'm beginner and that's why I need your help((
      I made dialog window like this and I want generate inputting data, but I don't know how...
      I think about using QVector3D, can you help me please?

      Untitled.jpg

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Christin You can use QVector3D, or you can use 3 variables: x, y, z.
      Where exactly do you need help?

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

      C 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Christin You can use QVector3D, or you can use 3 variables: x, y, z.
        Where exactly do you need help?

        C Offline
        C Offline
        Christin
        wrote on last edited by
        #3

        @jsulm I don't know how to use QVector3D))) I read some documentation and came across QVector3D and since I'm beginner I'm not good at coding

        jsulmJ 1 Reply Last reply
        0
        • C Christin

          @jsulm I don't know how to use QVector3D))) I read some documentation and came across QVector3D and since I'm beginner I'm not good at coding

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Christin But what exactly is the problem? You create an instance of QVector3D and set x,y,z using https://doc.qt.io/qt-5/qvector3d.html#setX
          https://doc.qt.io/qt-5/qvector3d.html#setY
          https://doc.qt.io/qt-5/qvector3d.html#setZ

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

          C 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Christin But what exactly is the problem? You create an instance of QVector3D and set x,y,z using https://doc.qt.io/qt-5/qvector3d.html#setX
            https://doc.qt.io/qt-5/qvector3d.html#setY
            https://doc.qt.io/qt-5/qvector3d.html#setZ

            C Offline
            C Offline
            Christin
            wrote on last edited by
            #5

            @jsulm I think creating is the problem, I don't understand how I must do it... I use EditLines for inputting data, then via QString I get it like text, but I need to make coordinates array

            JonBJ 1 Reply Last reply
            0
            • C Christin

              @jsulm I think creating is the problem, I don't understand how I must do it... I use EditLines for inputting data, then via QString I get it like text, but I need to make coordinates array

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

              @Christin

              • From your choice of using QEditText you can convert digits typed in into numbers via QString::toInt().

              • If you use instead QSpinBoxes, you get the numbers done for you in QSpinBox::value().

              Then you put those numbers into some array as required.

              C 1 Reply Last reply
              1
              • JonBJ JonB

                @Christin

                • From your choice of using QEditText you can convert digits typed in into numbers via QString::toInt().

                • If you use instead QSpinBoxes, you get the numbers done for you in QSpinBox::value().

                Then you put those numbers into some array as required.

                C Offline
                C Offline
                Christin
                wrote on last edited by
                #7

                @JonB thank you so much for your help!! I'll try... But using this way will project understand that it is coordinates?

                JonBJ 1 Reply Last reply
                0
                • C Christin

                  @JonB thank you so much for your help!! I'll try... But using this way will project understand that it is coordinates?

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

                  @Christin said in Enter points coordinates and generate it by pushing button:

                  But using this way will project understand that it is coordinates?

                  In the nicest way, you need to do some reading/understanding about basic programming: "and since I'm beginner I'm not good at coding". This site is not a tutorial for learning to program, you need to do that for yourself or go to suitable forums.

                  Computer programs don't "understand" anything (even less than e.g. football supporters/babies/world leaders). You will (have to do whatever to) use the numbers you get as coordinates --- or for that matter as money or apples --- from the library calls you make/whatever you pass the numbers to. The answer is "yes, you will be able to use those numbers as coordinates".

                  C 1 Reply Last reply
                  2
                  • JonBJ JonB

                    @Christin said in Enter points coordinates and generate it by pushing button:

                    But using this way will project understand that it is coordinates?

                    In the nicest way, you need to do some reading/understanding about basic programming: "and since I'm beginner I'm not good at coding". This site is not a tutorial for learning to program, you need to do that for yourself or go to suitable forums.

                    Computer programs don't "understand" anything (even less than e.g. football supporters/babies/world leaders). You will (have to do whatever to) use the numbers you get as coordinates --- or for that matter as money or apples --- from the library calls you make/whatever you pass the numbers to. The answer is "yes, you will be able to use those numbers as coordinates".

                    C Offline
                    C Offline
                    Christin
                    wrote on last edited by
                    #9

                    @JonB okay)) thank you!

                    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