Qt for beginners tutorial problem
-
Hi,
I'm currently trying out the tutorial, but I can't seem to compile this piece of code and I have no idea why. The error I'm getting is: "expected ',' before 'button2'", can someone help me out?
@ #include <QApplication>
#include <QPushButton>int main(int argc, char **argv) { QApplication app (argc, argv); QPushButton button1 ("test"); new QPushButton button2 ("other", &button1); button1.show(); return app.exec(); }
@
I'm running the latest Ubuntu with Qt5
Tutorial: "http://qt-project.org/wiki/Qt_for_beginners_pretty_button":http://qt-project.org/wiki/Qt_for_beginners_pretty_button -
Hi mr_kazoodle
Try removing "new" on line 9.
I test it on Windows and Qt5.0.1
Regards -
[quote author="SergioDanielG" date="1369345825"]Hi mr_kazoodle
Try removing "new" on line 9.
I test it on Windows and Qt5.0.1
Regards[/quote]worked! thanks :)