About functions and lineEdit
-
Well , that's the only way I would learn is by making mistakes :D , that's why I wanted to do it my way before trying what you guys have told me.
by the way why can't I call it in main ? should I include something first ?
-
and could you please tell me where should I call it ?
-
setLayout is a function of QWidget, so you need a QWidget object.
-
what if I made a class and inherited qwidget ? or there's a better way ?
-
Oh , so I could just create a pointer to that object and use that pointer to set the layout ? and if I wanted to make bigger programs I should just inherit it on my classes ?
-
Subclass QWidget, it's the correct way to go here.
You really should take a look at Qt's demos and examples, that will give you a good ground to build on
-
I really looked at some examples about two weeks ago " I don't have much time " since I've been busy with my midterms exams :(
but I'll finish this one , hopefully it will work then I'll look at some examples tomorrow.
-
about converting from string to int , should always do this ? is there a way to just take an integer or any type i want from the user ?
-
I think I'll create a new class to do these things , specially that this won't work because there's no reference. is it ok if I posted on this thread tomorrow ? or it's against the rules to bump a thread with +12 hours without posting ?
thanks man , I really appreciate your help.
-
It's better not to bump 24 hours is the common time interval.
If you want integers directly, use a QSpinBox, it will simplify your program