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

qt issue



Hi,

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 );
  biglist.show();
  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 
`QWindowsStyle::QWindowsStyle(void)'
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.

Bastiaan



Reply to: