I'm starting to use kdevelop to see if we can use it as our IDE at the office.
As you might expect, I'm just fooling around to see what and how things get done.
I'm trying the "distance conversion" example that comes with the QT tutorial. I created the UI, but when I test it, or run the application, the layout of the objects doesn't change when I resize the frame. They just remain the same size and position. What am I missing?
This is the ui file content:
Code:
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>Conversion</class>
<widget class="QDialog">
<property name="name">
<cstring>Conversion</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>350</width>
<height>228</height>
</rect>
</property>
<property name="caption">
<string>Conversión</string>
</property>
<spacer>
<property name="name">
<cstring>spacer2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="geometry">
<rect>
<x>170</x>
<y>160</y>
<width>20</width>
<height>20</height>
</rect>
</property>
</spacer>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout3</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>190</y>
<width>330</width>
<height>28</height>
</rect>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton">
<property name="name">
<cstring>limpiar</cstring>
</property>
<property name="text">
<string>L&impiar</string>
</property>
<property name="accel">
<string>Alt+I</string>
</property>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>calcular</cstring>
</property>
<property name="text">
<string>&Calcular</string>
</property>
<property name="accel">
<string>Alt+C</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>cerrar</cstring>
</property>
<property name="text">
<string>Cerrar</string>
</property>
<property name="accel">
<string></string>
</property>
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout4</cstring>
</property>
<property name="geometry">
<rect>
<x>11</x>
<y>11</y>
<width>330</width>
<height>148</height>
</rect>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLineEdit" row="3" column="1">
<property name="name">
<cstring>resultado</cstring>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>Distancia</string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="1">
<property name="name">
<cstring>distancia</cstring>
</property>
</widget>
<widget class="QComboBox" row="2" column="1">
<item>
<property name="text">
<string>Millas</string>
</property>
</item>
<item>
<property name="text">
<string>Yardas</string>
</property>
</item>
<item>
<property name="text">
<string>Pies</string>
</property>
</item>
<item>
<property name="text">
<string>Pulgadas</string>
</property>
</item>
<property name="name">
<cstring>hacia</cstring>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
<property name="text">
<string>Llevar a</string>
</property>
</widget>
<widget class="QLabel" row="3" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
<property name="text">
<string>Resultado</string>
</property>
</widget>
<widget class="QComboBox" row="1" column="1">
<item>
<property name="text">
<string>Kms</string>
</property>
</item>
<item>
<property name="text">
<string>mts</string>
</property>
</item>
<item>
<property name="text">
<string>cms</string>
</property>
</item>
<item>
<property name="text">
<string>mms</string>
</property>
</item>
<property name="name">
<cstring>desde</cstring>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
<property name="text">
<string>Unidad Métrica</string>
</property>
</widget>
<widget class="QLayoutWidget" row="4" column="1">
<property name="name">
<cstring>layout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer>
<property name="name">
<cstring>spacer3</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QSpinBox">
<property name="name">
<cstring>decimales</cstring>
</property>
<property name="maxValue">
<number>6</number>
</property>
<property name="value">
<number>3</number>
</property>
</widget>
</hbox>
</widget>
<widget class="QLabel" row="4" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
<property name="text">
<string>Decimales</string>
</property>
</widget>
</grid>
</widget>
</widget>
<connections>
<connection>
<sender>limpiar</sender>
<signal>clicked()</signal>
<receiver>resultado</receiver>
<slot>clear()</slot>
</connection>
<connection>
<sender>limpiar</sender>
<signal>clicked()</signal>
<receiver>distancia</receiver>
<slot>clear()</slot>
</connection>
<connection>
<sender>limpiar</sender>
<signal>clicked()</signal>
<receiver>distancia</receiver>
<slot>setFocus()</slot>
</connection>
<connection>
<sender>cerrar</sender>
<signal>clicked()</signal>
<receiver>Conversion</receiver>
<slot>close()</slot>
</connection>
<connection>
<sender>calcular</sender>
<signal>clicked()</signal>
<receiver>Conversion</receiver>
<slot>slotCalcular()</slot>
</connection>
<connection>
<sender>decimales</sender>
<signal>valueChanged(int)</signal>
<receiver>Conversion</receiver>
<slot>slotCalcular()</slot>
</connection>
<connection>
<sender>desde</sender>
<signal>activated(int)</signal>
<receiver>Conversion</receiver>
<slot>slotCalcular()</slot>
</connection>
<connection>
<sender>hacia</sender>
<signal>activated(int)</signal>
<receiver>Conversion</receiver>
<slot>slotCalcular()</slot>
</connection>
</connections>
<tabstops>
<tabstop>distancia</tabstop>
<tabstop>desde</tabstop>
<tabstop>hacia</tabstop>
<tabstop>resultado</tabstop>
<tabstop>decimales</tabstop>
<tabstop>limpiar</tabstop>
<tabstop>calcular</tabstop>
<tabstop>cerrar</tabstop>
</tabstops>
<slots>
<slot>slotCalcular()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
Boy! I didn't expect it to be so long.
Also, when I run it, the buttons at the bottom don't have the right size. They are too short.
and finally: should I go to a kdevelop forum for the cascade of questions I'll be making or should I stay here? Is there a kdevelop forum around there? maybe at
www.kdevelop.org?