[SailfishDevel] overlapping ComboBoxes

mariusz sapinski mariusz.sapinski at gmail.com
Wed Feb 24 09:44:51 UTC 2016


Hi,

   I have two ComboBoxes in one Column. Code looks a bit like that:

import QtQuick 2.0
import Sailfish.Silica 1.0

Dialog {

    id: setupDialog;
    allowedOrientations: Orientation.Portrait;

    property bool tmpUseMinute: useMinute;
    property bool tmpUseKwadrans: useKwadrans;
    property bool tmpUsePol: usePol;
    property bool tmpUseCala: useCala;


    Column {
         id: column;

         height: parent.height; // - (Theme.paddingMedium);
         anchors.leftMargin: Theme.paddingLarge;
         anchors.rightMargin: Theme.paddingLarge;
         width: setupDialog.width;
         spacing: Theme.paddingLarge;

         PageHeader {
             title: qsTr("Settings")
         }

         ComboBox {
             currentIndex: 1
             id: combo1
             label: "interval"
             width: setupDialog.width
             menu: ContextMenu {
                 MenuItem {
                     text: "1 minute (for test)"
                     onClicked: {
                         useMinute = true;
                         useKwadrans = false;
                         usePol = false;
                         useCala = false;
                     }
                 }
                 MenuItem {
                     text: "15 minutes"
                     onClicked: {
                         useMinute=false;
                         useKwadrans = true;
                         usePol = false;
                         useCala = false;
                     }
                 }
             } // end of first combo box: interval

              ComboBox {
                 currentIndex: 3
                 id: combo2
                 label: "duration"
                 width: setupDialog.width
                 menu: ContextMenu {
                     MenuItem {
                         text: "20 minutes"
                         onClicked: {
                             useTwenty = true;
                             useThirty = false;
                             useFortyFive = false;
                         }
                     }

                     MenuItem {
                         text: "30 minutes"
                         onClicked: {
                             useTwenty=false;
                             useThirty = true;
                             useFortyFive = false;
                         }
                     }

                 } // endof ContextMenu
                } // end of second combo box: duration


    } // end of Column

}
}


my unfortunately both boxes overlap on the screen. What am I missing? I
thought Column should take care that the elements inside are correctly
positioned.

Cheers, Mariusz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20160224/94797513/attachment.html>


More information about the Devel mailing list