If I read your code in the main function correctly, then you're including the wrong header. You include the header that was generated by the uic compiler for your dialog resource.
However as correctly done, you created a dialog class that inherits from the uic generated class. Your class correctly inherits QDialog, and with that comes the show() method. However now it seems that you're not using your own class in the main method. Try doing this instead:
#include "handmade.h" // <-- Use your own dialog class
#include <QApplication>
int main(int argc, char *argv[])
{
// Create an instance of your own dialog
handmade *dialog = new handmade;
dialog->show();
return app.exec();
}
#include "handmade.h" // <-- Use your own dialog class
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
// Create an instance of your own dialog
handmade *dialog = new handmade;
dialog->show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Then your dialog should work as expected.
Ups, I think it was answered just before...
Bookmarks