Results 1 to 7 of 7

Thread: How we increase the width of Scroll bar of QCombo Box

  1. #1
    Join Date
    Jun 2007
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Question How we increase the width of Scroll bar of QCombo Box

    Hi,

    When we resize the QComboBox to bigger size,drop down arrow of combo box becomes big sync with combo boz size but vertical Scroll bar's width is small (default size).How can we increase the width of combo box sync with Combo box's size .This behavior is on panels.Please give any suggestions.

    Thanks
    -Rajesh

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How we increase the width of Scroll bar of QCombo Box

    try to get the listview of combobox and then find the scrollbar as children, finally resize it.

  3. #3
    Join Date
    Jun 2007
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How we increase the width of Scroll bar of QCombo Box

    Thank you so much for your valuable suggestion.Could you please give suggestion to find out the width of dropdown menu of Qcombobox so that I can sync the width of vertical scroll bar with dropdown width.

    Thank you
    -Rajesh

  4. #4
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How we increase the width of Scroll bar of QCombo Box

    that drop down menu is the listview

    Qt Code:
    1. QComboBox:: view()->width()
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Jun 2007
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: How we increase the width of Scroll bar of QCombo Box

    Hi,

    [IMG]C:\Users\EXOR\Desktop\comboBox.jpg[/IMG]In panel when we resize the combobox ,the the rect which contain dropdown arrow also increasing,I would like to get the width of that rect.

    Thanks
    -Rajesh


    Added after 5 minutes:


    Hi,
    Please find the attachment to find the issue .Please give any suggestion
    Attached Images Attached Images
    Last edited by rajeshclt3; 16th August 2011 at 08:22.

  6. #6
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How we increase the width of Scroll bar of QCombo Box

    Qt Code:
    1. QComboBox combo;
    2. option.initFrom ( &combo );
    3. QRect buttonRect = qApp()->style()->subControlRect ( QStyle::CC_ComboBox, &option, QStyle::SC_ComboBoxArrow) ;
    To copy to clipboard, switch view to plain text mode 

  7. #7
    Join Date
    Jun 2007
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How we increase the width of Scroll bar of QCombo Box

    Thank you so much!!!!!!!!!

Similar Threads

  1. Set Default text in QCombo box
    By daarsh in forum Qt Programming
    Replies: 2
    Last Post: 11th April 2011, 10:38
  2. Need help on setting up Defult text on QCombo box
    By Askar in forum Qt Programming
    Replies: 3
    Last Post: 23rd February 2011, 10:50
  3. QDial disabling key scroll and mouse wheel scroll
    By ldg20 in forum Qt Programming
    Replies: 2
    Last Post: 2nd June 2010, 23:05
  4. how to increase menuitem's height and width?
    By aoo7wangyan in forum Qt Programming
    Replies: 1
    Last Post: 13th July 2009, 10:00
  5. Qcombo box
    By nErnie in forum Qt Programming
    Replies: 3
    Last Post: 17th September 2006, 00:56

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.