Thank you for your help. That all makes since to me. However, the following code should be acceptable right?
int test()
{
int argc = 1;
char *arg[] = {"test"};
quit.resize(75, 30);
QObject::connect(&quit,
SIGNAL(clicked
()),
&app,
SLOT(quit
()));
quit.show();
return app.exec();
}
int test()
{
int argc = 1;
char *arg[] = {"test"};
QApplication app(argc, argv);
QPushButton quit("Quit");
quit.resize(75, 30);
quit.setFont(QFont("Times", 18, QFont::Bold));
QObject::connect(&quit, SIGNAL(clicked()), &app, SLOT(quit()));
quit.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
I tried Qt Creator and this code did compile. However, when I run the project with Visual Studio (converting with qmake -t vclib), I receive the same linking errors. Another interesting discover is that if I point Qt Creator to the Qt files it came with, a .dll is produced. If I point it to the Qt files I compiled I only get a .lib file. Why is that? In any case I really need to be able to compile with Visual Studio. I have also discovered that a the above function will compile with Visual Studio if I make the function static. Naturally this also will not do. Any more ideas?
Bookmarks