Enter points coordinates and generate it by pushing button
-
@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 -
-
From your choice of using
QEditText
you can convert digits typed in into numbers via QString::toInt(). -
If you use instead
QSpinBox
es, you get the numbers done for you in QSpinBox::value().
Then you put those numbers into some array as required.
-
-
@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".