Results 1 to 2 of 2

Thread: QML Comboox listed items orientation

  1. #1
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default QML Comboox listed items orientation

    Dear Sirs and Madams!

    I have following simple QML Combobox in file UeStaffSelector.qml:
    Qt Code:
    1. import QtQuick 2.0
    2. import QtQuick.Controls 1.4
    3. import QtQuick.Controls.Styles 1.4
    4.  
    5. import si.mikroelektronika 1.0
    6.  
    7. Item
    8. {
    9. id: ueStaffSelector
    10.  
    11. width: 256
    12. height: 96
    13.  
    14. ComboBox
    15. {
    16. editable: false
    17. activeFocusOnPress: false
    18. selectByMouse: false
    19.  
    20. anchors.fill: parent
    21.  
    22. model: [ "Banana", "Apple", "Coconut" ]
    23.  
    24. style: ComboBoxStyle
    25. {
    26. label: Image
    27. {
    28. source: "qrc:///ueIcons/icons/ueUserLogError.png"
    29. } // label
    30.  
    31. background: Rectangle
    32. {
    33. width: parent.width
    34. height: parent.height
    35.  
    36. color: "black"
    37. } // background
    38. } // style
    39. } // ComboBox
    40. } // Item
    To copy to clipboard, switch view to plain text mode 
    It produces ComboBox as seen in screenshot:
    QMLComboboxOrientationCropped.png
    Now, this ComboBox resides in QML's app StatusBar and as you can see, test items are listed, that is ok. But, how do I reformat this item listing so it will reside on a top of ComboBox, as you can see from the screenshot?

    Sincerely,
    Marko
    Attached Images Attached Images
    Qt 5.3 Opensource & Creator 3.1.2

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QML Comboox listed items orientation

    I don't think there is a way to control this.

    A ComboBox is by default a drop-down control unless there is not enough space for the popup below the combobox.

    You'll likely have to create your own combobox-like control.

    Cheers,
    _

Similar Threads

  1. Replies: 2
    Last Post: 29th August 2014, 08:27
  2. Logical Interfaces within Solaris not listed by all addresses
    By umitadelaide in forum Qt Programming
    Replies: 0
    Last Post: 17th October 2011, 10:05
  3. Orientation Problem
    By prajnaranjan.das in forum Qt Programming
    Replies: 6
    Last Post: 8th February 2011, 14:20
  4. Replies: 1
    Last Post: 8th September 2010, 19:31
  5. QWidget orientation
    By Valheru in forum Qt Programming
    Replies: 8
    Last Post: 19th August 2008, 17:20

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.