All,
There is a bug in default mkspec for the qmake generation of Makefile.
/usr/lib/qt3/mkspecs/linux-g++-64/qmake.conf contains:
QMAKE_MOC = $(QTDIR)/bin/moc
QMAKE_UIC = $(QTDIR)/bin/uic
Which works fine resulting in:
MOC = $(QTDIR)/bin/moc
UIC = $(QTDIR)/bin/uic
However, for the QMAKE variable in the generated Makefile, you have:
QMAKE = qmake
Which causes the build to fail because it calls qmake in /usr/bin (qt4-devel
qmake) instead of qt3 qmake in /usr/lib/qt3/bin.
Changing the generated Makefile to:
QMAKE = $(QTDIR)/bin/qmake
allows qt3 builds to work fine.
I'm not sure where the bug is, but it looks like the default mkspec needs to
also prepend $(QTDIR)/bin to qmake to ensure qt3 qmake is called. I don't know
if that can be fixed by simply modifying the default mkspec with:
QMAKE_QMAKE = $(QTDIR)/bin/qmake
I ran into this issue rebuilding a small personal project that provide a
spinbutton and slider to set the laptop brightness from 0-20.
You can reproduce the issue in 15.4 with the following minimum example:
#include
#include
#include
#include
#include "brightness.h"
int main( int argc, char **argv )
{
QApplication a( argc, argv );
form_brightness w;
a.setMainWidget( &w );
w.show();
return a.exec();
}
and the .ui file is:
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>form_brightness</class>
<widget class="QWidget">
<property name="name">
<cstring>form_brightness</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>239</width>
<height>63</height>
</rect>
</property>
<property name="caption">
<string>Form1</string>
</property>
<widget class="QSlider">
<property name="name">
<cstring>slider1</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>171</width>
<height>21</height>
</rect>
</property>
<property name="focusPolicy">
<enum>StrongFocus</enum>
</property>
<property name="maxValue">
<number>20</number>
</property>
<property name="pageStep">
<number>2</number>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="tickmarks">
<enum>Both</enum>
</property>
<property name="tickInterval">
<number>2</number>
</property>
<property name="toolTip" stdset="0">
<string>set screen brightness</string>
</property>
<property name="whatsThis" stdset="0">
<string>screen brightness</string>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="geometry">
<rect>
<x>11</x>
<y>0</y>
<width>210</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>Screen Brightness</string>
</property>
</widget>
<widget class="QSpinBox">
<property name="name">
<cstring>spinBox1</cstring>
</property>
<property name="geometry">
<rect>
<x>190</x>
<y>30</y>
<width>30</width>
<height>20</height>
</rect>
</property>
<property name="focusPolicy">
<enum>WheelFocus</enum>
</property>
<property name="toolTip" stdset="0">
<string>set screen brightness</string>
</property>
<property name="whatsThis" stdset="0">
<string>screen brightness</string>
</property>
</widget>
</widget>
<connections>
<connection>
<sender>spinBox1</sender>
<signal>valueChanged(int)</signal>
<receiver>slider1</receiver>
<slot>setValue(int)</slot>
</connection>
<connection>
<sender>slider1</sender>
<signal>valueChanged(int)</signal>
<receiver>spinBox1</receiver>
<slot>setValue(int)</slot>
</connection>
</connections>
<layoutdefaults spacing="6" margin="11"/>
</UI>
Let me know whether this is a bug, or something that needs some other
workaround (sed ?).
--
David C. Rankin, J.D.,P.E.