Results 1 to 2 of 2

Thread: How to center-align QComboBox's drop down button?

  1. #1
    Join Date
    Jun 2015
    Posts
    12
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default How to center-align QComboBox's drop down button?

    By default, the QComboxBox's drop down button is right-aligned, but I need it to be placed in the center.
    I know I should use setStyleSheet method taking a string in a css-like language, which I'm absolutely clueless about.
    So I came here to ask you help me with this QStyleSheet stuff.
    Thanks in advance for possible solutions.

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    512
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to center-align QComboBox's drop down button?

    Hi, did you have a look at the examples? I think you would need to play with QComboBox::drop-down, although I have no idea why you would want to place the button in the center instead of left or right.

    Ginsengelf

Similar Threads

  1. align center in qml
    By ravandi in forum Qt Quick
    Replies: 1
    Last Post: 23rd November 2015, 12:27
  2. Qwt, Align content to center
    By Asting in forum Qwt
    Replies: 3
    Last Post: 18th June 2014, 11:06
  3. QComboBox drop down button outside combo box frame
    By Dmitry_1 in forum Qt Programming
    Replies: 1
    Last Post: 7th March 2012, 13:13
  4. How to align list items to the center?
    By zgulser in forum Qt Tools
    Replies: 4
    Last Post: 9th February 2009, 09:52
  5. QComboBox drop list button events
    By maird in forum Qt Programming
    Replies: 5
    Last Post: 20th October 2007, 19:25

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.