We don't even know what functionality you are talking about.I'll ask you once more, why my application doesn't have functionality?
Do you know how to use signals and slots?
We don't even know what functionality you are talking about.I'll ask you once more, why my application doesn't have functionality?
Do you know how to use signals and slots?
==========================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.
Objects on which I was doing:
doesn't work, nextStepButton does nothing and so on. Maybe It'll b e better if you can see my code. I'll attach dialog.cpp
Your kidding me?Of course, I know.
edit:
The problem isn't that I don't know how to connect signals to slots, I have functions which do something, connected to something and all should work, but it doesn't. Look at my file
Last edited by Salazaar; 13th June 2007 at 20:06.
well, settingUp() is a bunch of if() clauses.
Probably none of them gets to be true, so nothing happens.
Put a debug statement in and see if its being printed:
Qt Code:
bool Dialog::settingUp() { qDebug()<<"Dialog::settingUp()"; //the rest of your code. }To copy to clipboard, switch view to plain text mode
In addition make sure you get no signal/slot warnings when you execute the application.
==========================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.
None?? If I, let's say' check checkbox in one group, and second in second grop and if nextStep Button is clicked one if() clause sure returns true and all instructions in if() should be done. But even if is a problem (which I think it isn't a problem) some widgets should be hidden, and we can type any value (even string) to lineEdit, although I have a validator.
No, I don't have any signal/slots warning when executing application.
Last edited by Salazaar; 14th June 2007 at 12:13.
did you try the code I gave you in the last post?
==========================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.
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.
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.
Bookmarks