[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

qt issue


I am using debian unstable and I would like to compile the
following code which is QT:

#include <qapplication.h>
#include <qlistview.h>
#include <qheader.h>
#include <qwindowsstyle.h>

int main( int  argc, char**  argv )
  QApplication  a( argc, argv );
  a.setStyle( new QWindowsStyle );

  QListView biglist;
  biglist.addColumn( "dontcare" );
  biglist.header()->hide();  // hide the column header

  for ( int i=0; i < 10; i++ )  {
    new QCheckListItem( &biglist, QString("Item")+QString::number(i),
      QCheckListItem::CheckBox );

  a.setMainWidget( &biglist );
  return  a.exec();

However on compiling I get to following error:

bmw320:/usr/local/src/test# g++ -Wall -I$QTDIR/include -L/usr/lib test.cpp -o 
test -lqt
/tmp/ccGVWyMy.o: In function `main':
/tmp/ccGVWyMy.o(.text+0x40): undefined reference to 
collect2: ld returned 1 exit status

It seems the QwindowsStyle is causing problems. As I understand this
is compiled into QT as a plugin but how would I activate it ? 
Any help is very much apreciated.


Reply to: