Enter points coordinates and generate it by pushing button
-
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? -
@Christin You can use QVector3D, or you can use 3 variables: x, y, z.
Where exactly do you need help? -
@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
@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 -
@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 -
@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
-
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.
-
-
-
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.
-
-
@JonB thank you so much for your help!! I'll try... But using this way will project understand that it is coordinates?
@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".
-
@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".