Here's my simplified code.
Code:
#include <qapplication.h>
#include <qlistview.h>
#include <qlineedit.h>
class QFileView : public QListView
{
public:
QFileView( QWidget* parent = 0, const char * name = 0 );
};
QFileView::QFileView(QWidget* parent, const char* name) : QListView(parent, name)
{
addColumn("File", 100);
QLineEdit* le = new QLineEdit(this, "Hello");
le->setReadOnly( true );
}
int main( int argc, char ** argv ) {
QApplication a( argc, argv );
QFileView* mw = new QFileView();
//mw->setCaption( "Install Script Maker" );
mw->show();
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
return a.exec();
}
This compiles, but hello does not display in the QLineEdit box and the QLineEdit box overlaps my column that says file. How can I fix this?