PDA

View Full Version : ui file and .cpp files do not agree with each other



eLancaster
24th December 2010, 12:15
When I design the layout of my program on the form designer, I put all the buttons and lineEdits and I give them object names,
but when I connect those object names with commands, it says that the pushButton was nor declared or that the LineEdit was not declared.



/home/lancaster/QtProjects/pop-build-desktop/../pop/myqtapp.cpp:11: error: ‘pushButton_Browse’ was not declared in this scope

Zlatomir
24th December 2010, 13:30
Look at the class definition, most likely you will need to access the Ui elements with the help of the ui pointer, something like:


connect(ui->widgetName, SIGNAL//(...)...