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

Qt-interest Archive, May 2007
qmake and -lQtSql


Message 1 in thread

Hi!

I'm working over some big database project and every time I create new
form ( widget ) I have to re-run qmake -project && qmake

It's no prob to run this command, but besides that I have to manually edit
generated Makefile in order to add those options: ( always
-I/usr/include/qt4/QtSql and -lQtSql )

qmake always generates Makefile without needed Sql inc-paths and lib-paths

INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I.
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.
-Isrc -I. -I. 
LINK          = g++ 
LFLAGS        = 
LIBS          =
$(SUBLIBS)  -L/usr/lib/qt4 -lQtGui -L/usr/lib/qt4 -L/usr/lib -lpng -lSM
-lICE -lXrender -lXrandr -lXfixes -lXcursor -lfreetype -lfontconfig -lXext
-lX11 -lQtCore -lz -lm -ldl -lpthread


Can I configure it to add Sql needed things into Makefile by default ( e.g.
when I re-run qmake -project && qmake ), without manually aditing Makefile?

Thanks!

 -- 
God bless you!
Ilia

2.6.19-gentoo-r5 AMD Athlon(tm) XP 2600+

mailto: ternovich@xxxxxxxxx
icq: 198233378

VegaTrek Developer: http://wcuniverse.sourceforge.net/vegatrek/
VegaTrek Forum Moderator:
http://vegastrike.sourceforge.net/forums/viewforum.php?f=13
============================================================================
How did her parents punish Helen Keller? rearrange the furniture
	-- gsfgf
============================================================================
$gpg --keyserver cryptonomicon.mit.edu --search-keys tillias

--
 [ signature omitted ] 

Message 2 in thread

On 11.05.07 15:19:00, Ilia N Ternovich wrote:
> I'm working over some big database project and every time I create new
> form ( widget ) I have to re-run qmake -project && qmake

No you don't, just add the .ui file to the FORMS variable.

> Can I configure it to add Sql needed things into Makefile by default ( e.g.
> when I re-run qmake -project && qmake ), without manually aditing Makefile?

Of course you can and its explained in the qmake manual in the Qt
documentation (hint look for QT variable).

Andreas

-- 
 [ signature omitted ] 

Message 3 in thread

Hi.

> It's no prob to run this command, but besides that I have to manually edit
> generated Makefile in order to add those options: ( always
> -I/usr/include/qt4/QtSql and -lQtSql )
>
> qmake always generates Makefile without needed Sql inc-paths and lib-paths
>
> INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I.
> -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore
> -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.
> -Isrc -I. -I.
> LINK          = g++
> LFLAGS        =
> LIBS          =
> $(SUBLIBS)  -L/usr/lib/qt4 -lQtGui -L/usr/lib/qt4 -L/usr/lib -lpng -lSM
> -lICE -lXrender -lXrandr -lXfixes -lXcursor -lfreetype -lfontconfig -lXext
> -lX11 -lQtCore -lz -lm -ldl -lpthread
>
>
> Can I configure it to add Sql needed things into Makefile by default ( e.g.
> when I re-run qmake -project && qmake ), without manually aditing Makefile?

Have you tried 

QT += sql

in your .pro file?

> God bless you!
I dont want to be blessed. 


Best,
  Morten

--
 [ signature omitted ] 

Message 4 in thread

> Have you tried
>
> QT += sql
>
> in your .pro file?

Aaah. Now i see. You dont maintain a .pro file. do you?
Then you should be able to do:

qmake -o myproject.pro && echo "QT += sql" >> myproject.pro && qmake 

That should work.

Best,
  Morten

--
 [ signature omitted ]