I think public Ui:ialog is needed to access gui elements
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.
Yes, I'm using assistant. I would check it in docs, but I just written that I don't know what's the problem about
I made this changes you post, but when i launch application, only dialog window appear. I mean, no gui elements are displayed, only empty window. is that a 'typo'?
Yes, but this time its yours:I mean, no gui elements are displayed, only empty window. is that a 'typo'?
Qt Code:
int main(int argc, char *argv[]) { //QDialog *window = new QDialog; Dialog *window = new Dialog; 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.
Salazaar, please read and at least try to understand the code you write. I think you should be able to distinguish between "QDialog" and "Dialog".
It should be new Dialog. Right?
Salazaar, are you using Qt Assistant? It has nice indexing and searching functions...
Oh allrgiht...
Salazar - I had a typo when in the code, and thought it might be a good lesson for you...
It should be QApplication::setMainWidget ()
==========================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.
Actually you shouldn't need that line at all.
True.
But it doesn't hurt.![]()
==========================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