Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt Eclipse basic question
Redbird last edited by
Hi again, I'm new with Qt. using the Qt Eclipse integration, I want to build a really simple program.
First, if I want a box that user can enter values, but it has to be integers. How do I limit that? eg. if I use line edit, it takes any characters?
Second, in the Main.cpp, how do I make multiple widgets go on the same window. Right now, I have a couple of buttons/labels, but each one show a different window.
QLabel *msg= new QLabel ("Welcome!");
QPushButton *close=new QPushButton("close");
QObject::connect (close, SIGNAL(clicked()),&a, SLOT(quit()));
Sorry, I'm really a beginner to Qt. Thanks in advance
[EDIT: code formatting, please wrap in @-tags; Volker]
kkrzewniak last edited by
I think what You are looking for is a SpinBox. And really why do You need to use Eclipse isn't QtCreator an option? In my mind, making someone use Eclipse is a very harsh form of punishment.