Yes, I tried it, application compiled with no errors, and no errors at launching.
Yes, I tried it, application compiled with no errors, and no errors at launching.
Amm... yes, I expected as much, but the point was to see if you ar getting the debug message...
EDIT:
you should start the application from the console
==========================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.
Debug message? What do you mean? I tried to type make all instead of make, and reached message that it cannot find file somename.dll. And if it's not the answer you were expecting, how can I reach debugg message?
Am... look at the code I gave you.
there is a line:
Qt Code:
qDebug()<<"Dialog::settingUp()";To copy to clipboard, switch view to plain text mode
This will print 'Dialog::settingUp()' in the console if you run the application in the console, and if the slot will get executed.
If the slot will not get executed, the message will not be printed.
This will tell you if the problem is IN the slot, or that the problem is that the slot is not being called.
Just start the program in the console, and see what ouput you get.
No need for 'make all' or any other thing.
==========================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.
He's using Windows, so adding CONFIG+=console and rerunning qmake is advised.
I added this, rebuild application, console window opened (and also normal windows application with GUI opened) but the console was clear. What does it mean?
it means the slot is not being called.
But at the moment I don't have the time to review you code again...
So check every thing that has to do with the signal/slot connection.
==========================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.
Ok, I'll review it to find what's wrong. But even if the slot is not called, some widgets should be hidden even if there's no connection. Connection look:
Qt Code:
connect(ui.nextStepButton, SIGNAL(clicked()), this, SLOT(settingUp()));To copy to clipboard, switch view to plain text mode
So what's wrong?
You tell us Did you come up with anything while reviewing your code? Because as for now you're the only one who saw it...
post ALL your code.
The one file yo posted looks ok.
==========================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.
Sure. Unfortunately my files are too big to attach them, I'll post it in rar file
http://download.yousendit.com/049347421EAD445D
you should really read and try SIMPLE examples untill you get how the ui aproach works in Qt.
Qt Code:
int main(int argc, char *argv[]) { //Ui::Dialog ui; //ui.setupUi(window); app.setMainWindow(window); window->show(); return app.exec(); }To copy to clipboard, switch view to plain text mode
==========================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.
I am starting to think you are kidding me...Your kidding me? Of course, I know.Do you know how to use signals and slots?
Qt Code:
{ Q_OBJECT public: public slots: //<<----this is needed bool settingUp(); void previousStep(); private: Ui::Dialog ui; };To copy to clipboard, switch view to plain text mode
==========================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.
I think public Ui:ialog is needed to access gui elements
as I said, READ about it more.
You have a private ui elements which you use in your Dialog class.
If you use that approach you don't need to sublcass, one of the nice things about Qt4 ui way.
==========================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.
Right. But there is an error in line
class QApplication has no member named setMainWindowQt Code:
app.setMainWindow(window);To copy to clipboard, switch view to plain text mode
that is correct.
What do you do then?
==========================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.
I don't know
Read the docs maybe??
==========================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