Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, May 2008
Making a Simple Qt4 App


Message 1 in thread

All I did was create a basic dialog with buttons. Here's my code for the
app.
#include "ui_convform.h"
#include <QtGui/QApplication>

int main(int argc, char **argv)
{
    QApplication app(argc, argv);
    Ui::ConversionForm *widget = new Ui::ConversionForm();
    widget->show();
    return app.exec();
}

I keep getting errors about show not being defined by ConversionForm. Also,
when I open up the header file generated from uic, ui_convform.h, the top
section looks like this:
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDialog>
#include <QtGui/QDialogButtonBox>

QT_BEGIN_NAMESPACE

class Ui_ConversionForm
{
...
};

ConversionForm does not inherit QDialog which is why it doesn't inherit
show. How do I show this dialog?

Message 2 in thread

Hi Bobby,

> 
> ConversionForm does not inherit QDialog which is why it doesn't
> inherit show. How do I show this dialog?

http://doc.trolltech.com/4.4/designer-using-a-component.html#compile-time-form-processing

\Ralf

--
 [ signature omitted ]