Classes aren't something I've used in my limited experience of C++, so I will go away and read up them now, cheers![]()
Classes aren't something I've used in my limited experience of C++, so I will go away and read up them now, cheers![]()
Good idea, you'll be using them a lot in Qt programming![]()
Just cracked it, thanks. I didn't realise that what I put in setText() has to be of type QString!
Another day, another problem!
When I try to access labels via ui->label_X, some of them aren't appearing. I entered the name manually, but when I compile, I get the error " 'class ui_guibrachy' has no member name 'label_X'
Have I turned something off that I don't know about
I tried adding a button to see if that showed up, which it didn't. Could it be that I designed the ui on Mac OS X and today I'm using windows?!
Thanks.
1. Open this file with designer and double-check the object's names.When I try to access labels via ui->label_X, some of them aren't appearing. I entered the name manually, but when I compile, I get the error " 'class ui_guibrachy' has no member name 'label_X'
2. Make sure you have saved changes.
3. Make sure that you compile correct .ui file ( check if its included in your .pro project file ) and include correct ui header in your sources.
4. Check for typos in source files.
5. Do a clean build ( make clean, qmake, make [debug/release] ) .
There is a big chance of success if you do all of this correctly
You mean that you've added a button via designer and it wont show up in you app ? If yes, then double-check 2) and 3)I tried adding a button to see if that showed up, which it didn't
1. Done
2. Done (closed and opened again to make sure they're there)
3. Done (all in the proj file)
4. Looks OK
5. Think I did this, Build->clean all
Any other ideas![]()
look in ui_guibrachy.h see if you can spot your label object.
If not, then some or all of steps 1-3 you didn't do right.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Bookmarks