trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: November 2016

Struggling with (T)QT3 tutorial

From: gregory guy <zadig83@...>
Date: Sun, 27 Nov 2016 16:25:21 +0100
Hi there!

Not sure if It"s the right thing to do, but I adjusted tutorial 1 code (hello world) like this:

-------------------------------------------------------------

#include <tqapplication.h>
#include <tqpushbutton.h>


int main( int argc, char **argv )
{
      TQApplication a( argc, argv );

      TQPushButton hello( "Hello world!", 0 );
      hello.resize( 100, 30 );
      a.setMainWidget( &hello );
      hello.show();
      return a.exec();
}

------------------------------------------------------------

Since I've compiled Trinity by myself the headers are located in /usr/include/tqt and /usr/include/tqt3, the libraries (all of them) in /usr/lib64.

I had to adjust the Makefile file accordingly, like this:

---------------------------------------------------------------------------------------------------------------------

INCPATH  = -I/usr/share/tqt3/mkspecs/default -I. -I/usr/include/tqt -I/usr/include/tqt3
LINK     = g++
LFLAGS   = -luuid  -Wl,-rpath,/usr/lib64
LIBS     = $(SUBLIBS) -L/usr/lib64 -L/usr/X11R6/lib -luuid -ltqt-mt
-lXext -lX11 -lm -lpthread

---------------------------------------------------------------------------------------------------------------------

Hope that help!