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

Qt-interest Archive, January 2007
qmake options


Message 1 in thread

Hi,

I have a project using qmake. 
In the *.pro I have :
 LIBS += -lmysqlclient

It works well on my ubuntu system where libmysqlclient is in /usr/lib but on
a fedora core 6 where libmysqlclient is in /usr/lib/mysql/ ldd fails to
find the lib.

Is there an easy way to deal with this kind of problem with qmake or should
use the autotools ?

TIA

Alain


--
 [ signature omitted ] 

Message 2 in thread

On 24.01.07 09:50:31, denebet wrote:
> I have a project using qmake. 
> In the *.pro I have :
>  LIBS += -lmysqlclient
> 
> It works well on my ubuntu system where libmysqlclient is in /usr/lib but on
> a fedora core 6 where libmysqlclient is in /usr/lib/mysql/ ldd fails to
> find the lib.
> 
> Is there an easy way to deal with this kind of problem with qmake or should
> use the autotools ?

No, neither of the two solutions is really good. To have it work with
qmake you need to add -L/usr/lib/mysql to the LIBS variable, but you'd
have to change it on every system where mysql is not installed in that
place or /usr/lib.

autotools allow you to write a configure option that would search for
the lib in common places and allow the user to add a specific search
path via a special configure argument. You can do pretty much the same
by writing a shell configure script which fills the file .qmake.cache in
your top-level project dir with LIBS = -L/path. QMake will then
automatically use the values from .qmake.cache as default values for the
variables.

Andreas

-- 
 [ signature omitted ] 

Message 3 in thread

Andreas Pakulat schrieb:
> On 24.01.07 09:50:31, denebet wrote:
>> ...
>> It works well on my ubuntu system where libmysqlclient is in /usr/lib but on
>> a fedora core 6 where libmysqlclient is in /usr/lib/mysql/ ldd fails to
>> find the lib.
> ...
> autotools allow you to write a configure option that would search for
> the lib in common places and allow the user to add a specific search
> path via a special configure argument. You can do pretty much the same
> by writing a shell configure script which fills the file .qmake.cache in
> your top-level project dir with LIBS = -L/path. QMake will then
> automatically use the values from .qmake.cache as default values for the
> variables.

Hmmm, doesn't qmake in Qt 4 have support for something called pkg-config
on Unix? See

http://doc.trolltech.com/4.2/qmake-project-files.html#configuration-features

Assuming that mySQL would have such a "pgk-config" support, could you
not just use something like:

 CONFIG += link_pkgconfig
 PKGCONFIG += mysql

According to the Qt docs that works with d-bus and ogg...

Cheers, Oliver

--
 [ signature omitted ] 

Message 4 in thread

On 24.01.07 15:44:30, Till Oliver Knoll wrote:
> Andreas Pakulat schrieb:
> > On 24.01.07 09:50:31, denebet wrote:
> >> ...
> >> It works well on my ubuntu system where libmysqlclient is in /usr/lib but on
> >> a fedora core 6 where libmysqlclient is in /usr/lib/mysql/ ldd fails to
> >> find the lib.
> > ...
> > autotools allow you to write a configure option that would search for
> > the lib in common places and allow the user to add a specific search
> > path via a special configure argument. You can do pretty much the same
> > by writing a shell configure script which fills the file .qmake.cache in
> > your top-level project dir with LIBS = -L/path. QMake will then
> > automatically use the values from .qmake.cache as default values for the
> > variables.
> 
> Hmmm, doesn't qmake in Qt 4 have support for something called pkg-config
> on Unix? See
> 
> http://doc.trolltech.com/4.2/qmake-project-files.html#configuration-features
> 
> Assuming that mySQL would have such a "pgk-config" support, could you
> not just use something like:
> 
>  CONFIG += link_pkgconfig
>  PKGCONFIG += mysql
> 
> According to the Qt docs that works with d-bus and ogg...

But mysql doesn't provide pkg-config and actually not that many programs
provide .pc information. Until a year or 2 ago it was mainly gtk/gnome
programs that used pkg-config.

Andreas

-- 
 [ signature omitted ] 

Message 5 in thread

Hi,

I am using QRubberBand on a QGLWidget and under Windows XP style the 
rubberband is not transparent, but fills the rubberband with a solid 
color. (Under the classic Windows theme it is nice transparent)

Could anybody help me to set the rubberband's style so that it will be 
transparent on every platform? i have seen there is the 
QStyleOptionRubberBand, but I do not know how I could use it to set my 
current style to use a custom style. Could I force this way my 
rubberband to be rendered transparently?

Thank you in advance,
balint

--
 [ signature omitted ] 

Message 6 in thread

In the meantime I looked it up in the QT source code, and I noticed that 
the following will solve my problem:
myQRubberBand->setWindowFlags(Qt::ToolTip);

It might not be the textbook solution, but it works, I hope it does not 
break other things. If anybody has a proven better solution, of course I 
would be grateful...

Thanks,
Balint

Bálint Miklós wrote:
> Hi,
>
> I am using QRubberBand on a QGLWidget and under Windows XP style the 
> rubberband is not transparent, but fills the rubberband with a solid 
> color. (Under the classic Windows theme it is nice transparent)
>
> Could anybody help me to set the rubberband's style so that it will be 
> transparent on every platform? i have seen there is the 
> QStyleOptionRubberBand, but I do not know how I could use it to set my 
> current style to use a custom style. Could I force this way my 
> rubberband to be rendered transparently?
>
> Thank you in advance,
> balint
>
> -- 
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>

--
 [ signature omitted ] 

Message 7 in thread

Am 24.01.2007, 09:50 Uhr, schrieb denebet <denebet@xxxxxxxxxxxx>:

> Hi,
>
> I have a project using qmake.
> In the *.pro I have :
>  LIBS += -lmysqlclient
>
> It works well on my ubuntu system where libmysqlclient is in /usr/lib  
> but on
> a fedora core 6 where libmysqlclient is in /usr/lib/mysql/ ldd fails to
> find the lib.
>
> Is there an easy way to deal with this kind of problem with qmake or  
> should
> use the autotools ?
>
> TIA
>
> Alain
>
>

Just define a custom feature in your .pro file like

fedora {
   LIBS += -L/usr/lib/mysql
}

--
 [ signature omitted ]