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

Qt-interest Archive, March 2002
how to compile a cpp file in qt?


Message 1 in thread

 I have translated an ui file into cpp file with uic.
Can you tell me what must I do to compile the cpp file?
Shall I use qmake? If so,how to use it?


Message 2 in thread

Hi torjan,

> I have translated an ui file into cpp file with uic.
> Can you tell me what must I do to compile the cpp file?
> Shall I use qmake? If so,how to use it?

First I generate an Makefile with tmake (www.trolltech.com),
after generating the MAkefile I 'll used make.

Write an makefile.pro File and try 'tmake -o Makefile makefile.pro'

With qmake I'haven´t worked ...

Greetings

Andre


Message 3 in thread

On Fri, 1 Mar 2002, torjan wrote:

>  I have translated an ui file into cpp file with uic. Can you tell me
> what must I do to compile the cpp file? Shall I use qmake? If so,how to
> use it?
> 
What kind of build system you use doesn't matter. It's a .cpp file like 
any other. Just add to your project or Makefile like you would any other.

If you're on linux, KDevelop will take care of all your build/configure 
worries. Check it out. (http://www.kdevelop.org)

-- 
 [ signature omitted ] 

Message 4 in thread

Hi everybody

Can someone explain why the following code won't display a 8-bit gray
scale image properly
 
  QColor *colors[256];
  QRgb colorTable[256];
  for(int i=0;i<256;i++) {
    colors[i]=new QColor(i,i,i);
    colorTable[i]=colors[i]->rgb();
  }
  QImage im(data,nx,ny,8,colorTable,256,QImage::IgnoreEndian);

while this will work :

  QImage im(data,nx,ny,8,NULL,256,QImage::IgnoreEndian);
  for ( int i=0; i < 256; i++)
      im.setColor( i, qRgb( i, i, i ) ); 

Thanks a lot


Message 5 in thread

My mistake is clear
Sorry for this post


Olivier Colliot wrote:
> 
> Hi everybody
> 
> Can someone explain why the following code won't display a 8-bit gray
> scale image properly
> 
>   QColor *colors[256];
>   QRgb colorTable[256];
>   for(int i=0;i<256;i++) {
>     colors[i]=new QColor(i,i,i);
>     colorTable[i]=colors[i]->rgb();
>   }
>   QImage im(data,nx,ny,8,colorTable,256,QImage::IgnoreEndian);
> 
> while this will work :
> 
>   QImage im(data,nx,ny,8,NULL,256,QImage::IgnoreEndian);
>   for ( int i=0; i < 256; i++)
>       im.setColor( i, qRgb( i, i, i ) );
> 
> Thanks a lot
> 
> --
> List archive and information: http://qt-interest.trolltech.com

-- 
 [ signature omitted ] 

Message 6 in thread

you need to go through some tutorials...try looking at the documentation
from trolltech at
http://www.trolltech.com/developer/documentation/index.html
and/or
http://doc.trolltech.com/3.0/designer-manual.html



----- Original Message -----
From: "torjan" <torjan@x263.net>
To: <qt-interest@trolltech.com>
Sent: Friday, March 01, 2002 7:00 AM
Subject: how to compile a cpp file in qt?


> I have translated an ui file into cpp file with uic.
> Can you tell me what must I do to compile the cpp file?
> Shall I use qmake? If so,how to use it?
>
> --
> List archive and information: http://qt-interest.trolltech.com
>


Message 7 in thread

Hello!

Has anyone some example sourcecode of how to integrate a spacemous (USB
3DxWare www.3dconnexion.com) into Qt (win32)? Under
http://qt-interest.trolltech.com/bws2.html only some general information
about it can be found.

regards,
Sascha.Schneider@igd.fhg.de