Peter Kümmel wrote:
but have you tried
#if (QT_VERSION >= 0x040200) ?
doesn't work
Andre Poenitz wrote:
> On Tue, Jun 12, 2007 at 09:38:59PM +0200, Peter Kümmel wrote:
>> Edwin Leuven wrote:
>>> Edwin Leuven wrote:
Peter Kümmel wrote:
> I'm wrong, moc is better now. Here (4.3) this macro check works:
>
> #if (QT_VERSION >= QT_VERSION_CHECK(4, 2, 0))
>>> and
>>>
>
On Tue, Jun 12, 2007 at 09:38:59PM +0200, Peter Kümmel wrote:
> Edwin Leuven wrote:
> > Edwin Leuven wrote:
> >> Peter Kümmel wrote:
> >>> I'm wrong, moc is better now. Here (4.3) this macro check works:
> >>>
> >>> #if (QT_VERSION >= QT_VERSION_CHECK(4, 2, 0))
> >
> > and
> >
> > #if QT_VERSION
Peter Kümmel wrote:
maybe QT_VERSION_CHECK is new in qt4.3, could you find it in
src/corelib/global/qglobal.h?
you're right, it's not there (4.2.1)
Does it help when you add for Qt<4.3?
#define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
when i add this to the he
Edwin Leuven wrote:
> Edwin Leuven wrote:
>> Peter Kümmel wrote:
>>> I'm wrong, moc is better now. Here (4.3) this macro check works:
>>>
>>> #if (QT_VERSION >= QT_VERSION_CHECK(4, 2, 0))
>
> and
>
> #if QT_VERSION >= QT_VERSION_CHECK(4, 2, 0)
>
> compiles but with the following messages:
>
> 1
Edwin Leuven wrote:
Peter Kümmel wrote:
I'm wrong, moc is better now. Here (4.3) this macro check works:
#if (QT_VERSION >= QT_VERSION_CHECK(4, 2, 0))
and
#if QT_VERSION >= QT_VERSION_CHECK(4, 2, 0)
compiles but with the following messages:
1>c:\lyx\trunk\src\frontends\qt4\IconPalette.h(20
Peter Kümmel wrote:
Peter Kümmel wrote:
http://lists.trolltech.com/qt-interest/2006-05/thread00319-0.html
http://lists.trolltech.com/qt-interest/2000-10/msg00401.html
A solution would be to have two header files, and to include the header
and moc file in a #if block.
I'm wrong, moc is better
Peter Kümmel wrote:
>
> http://lists.trolltech.com/qt-interest/2006-05/thread00319-0.html
> http://lists.trolltech.com/qt-interest/2000-10/msg00401.html
>
> A solution would be to have two header files, and to include the header
> and moc file in a #if block.
I'm wrong, moc is better now. Here
On Tue, Jun 12, 2007 at 02:16:48PM +0200, Pavel Sanda wrote:
> > perhaps someone can tell me the way to do this?
>
> > # if QT_VERSION >= 0x040200
>
> i'm just guessing but is correct the space between '#' and 'if' ?
That's no problem.
On the contrary, '#' must be in the first column, even if m
Leuven, E. wrote:
> i would like to have another implementation for IconPalette for qt version
> 4.2 and higher, and am wondering how to do this.
>
> now i have the code below in the header file but the compiler doesn't seem to
> like it.
>
> perhaps someone can tell me the way to do this?
>
>
Leuven, E. wrote:
> but isn't the problem here that the #if's don't get respected?
Does it help if you add the condition inside the function, when a function
is defined twice for either version? I.e., only define each function once,
but define different content?
Jürgen
>> but isn't the problem here that the #if's don't get respected?
>>
>> (and we would end up trying to compile a class that inherits qwidgetaction
>> with qt 4.1)
>
> Maybe not, look at the generated moc file in order to make sure.
it has the following (and it shouldn't be there)
// SIGNAL 1
vo
Leuven, E. wrote:
Abdelrazak Younes wrote:
Leuven, E. wrote:
I guess moc doesn't care about the #if. You should probably use
different naming for the two classes.
but in qt 4.1 there is no qwidgetaction so will still need some magic no?
Sure, the #if should stay but for 4.2 you should maybe re
Abdelrazak Younes wrote:
> Leuven, E. wrote:
>>> I guess moc doesn't care about the #if. You should probably use
>>> different naming for the two classes.
>>
>> but in qt 4.1 there is no qwidgetaction so will still need some magic no?
>
> Sure, the #if should stay but for 4.2 you should maybe ren
Leuven, E. wrote:
I guess moc doesn't care about the #if. You should probably use
different naming for the two classes.
but in qt 4.1 there is no qwidgetaction so will still need some magic no?
Sure, the #if should stay but for 4.2 you should maybe rename
IconPalette to IconPalette42.
Just
>I guess moc doesn't care about the #if. You should probably use
> different naming for the two classes.
but in qt 4.1 there is no qwidgetaction so will still need some magic no?
Pavel wrote:
>> # if QT_VERSION >= 0x040200
>
> i'm just guessing but is correct the space between '#' and 'if' ?
doesn't matter
i copy-pasted these things, but in the end i tried both
perhaps cmake doesn't preprocess the header files properly, i am at a loss
here...
Leuven, E. wrote:
Jean-Marc Lasgouttes wrote:
> This is supposed to work. What error message do you get?
patch attached. this allows tearing-off of the math panels with qt>= 4.2
(bugs 3839 and 3840)
I guess moc doesn't care about the #if. You should probably use
different naming for the two
> perhaps someone can tell me the way to do this?
> # if QT_VERSION >= 0x040200
i'm just guessing but is correct the space between '#' and 'if' ?
pavel
Jean-Marc Lasgouttes wrote:
> This is supposed to work. What error message do you get?
patch attached. this allows tearing-off of the math panels with qt>= 4.2 (bugs
3839 and 3840)
here the error:
1>C:\lyx\build-msvc\src\frontends\qt4\IconPalette_moc.cpp(61) : error C2352:
'QWidget::qt_metacas
> "Edwin" == Leuven, E <[EMAIL PROTECTED]> writes:
Edwin> # if QT_VERSION >= 0x040200
Edwin> class IconPalette : public QWidgetAction { ... };
Edwin> # else
Edwin> class IconPalette : public QWidget { ... };
Edwin> # endif // QT_VERSION >= 0x040200
This is supposed to work. What error mes
i would like to have another implementation for IconPalette for qt version 4.2
and higher, and am wondering how to do this.
now i have the code below in the header file but the compiler doesn't seem to
like it.
perhaps someone can tell me the way to do this?
thanks!
# if QT_VERSION >= 0x0402
22 matches
Mail list logo