Unsolved no member named 'sensivity' in 'Ui::Widget'
-
Hi,
I can not get text from the ui label. I dont understand why.
Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) { ui->setupUi(this);
and there is label : sensivity . I added from UI
and this is :
SENSIVITY = ui->sensivity->text();
give error:
widget.cpp:1019: error: no member named 'sensivity' in 'Ui::Widget' SENSIVITY = ui->sensivity->text(); ~~ ^
any idea...
I rebuild project but still same problem.
-
Hi
The code
SENSIVITY = ui->sensivity->text();
is that in a cpp file ?i would press f2 on ui->setupUi(this);
and see it does in fact create such widget. -
@RahibeMeryem You can post the
ui_widget.h
code here too and we can tell if it has that actual member. Of course you could check your ui file as well to make sure it's in there and labeledsensitivity
.If you are still stuck post the ui_widget.h or the widget.ui (guessing at that name) file.
-
@RahibeMeryem said in no member named 'sensivity' in 'Ui::Widget':
sensivity
Maybe it's called sensitivity?
-
"sensivity" name of the label. its correct. Now I added a QSlider and cant see in my running GUI.
I think some where QT Creator stuck. Clean and rebuild didnt work.
Any other way to re generate UI ?
-
@RahibeMeryem educated guess, you have uncheck the "Shoadow build" Checkbox in your Build Settings?
I had it, when I ran without shadow build, that a "clean" did in fact not clean everything and the ui-file buged out.
Simplest solution select a new shadow build folder.
-
What I discovered I check out the shadow build option from project now all is ok.
Some how QTCreator using old UI code instead of edited one.
-
@RahibeMeryem
with unchecking it, you selected a new build folder, your project folder, thats going to get messy pretty quickly.leaving it checked and simply deleting the build folder would lead to the same result.