Results 1 to 7 of 7

Thread: Styling a QComboBox

  1. #1
    Join Date
    Aug 2007
    Posts
    27
    Qt products
    Qt4
    Platforms
    Unix/X11

    Exclamation Styling a QComboBox

    I`m using CSS like:
    Qt Code:
    1. border: 1px solid gray;
    2. border-radius: 3px;
    3. }
    To copy to clipboard, switch view to plain text mode 

    By using this code the QComboBox gets an unexpected scrollbar, even if it has 3 items... and by selecting the last item... an unwanted and unselectable blank item also apears after the last item.

    I will come back tomorrow with code and screenshots.

    Any ideea of why this happens?

    Using Qt 4.3.1.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Styling a QComboBox

    This seems to be easy to reproduce with designer preview. It's somehow ironic that this happens with an example from the docs.
    J-P Nurmi

  3. #3
    Join Date
    Aug 2007
    Posts
    27
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Re: Styling a QComboBox

    So... to bug or not to bug?

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Styling a QComboBox

    Quote Originally Posted by Enygma View Post
    So... to bug or not to bug?
    To me it looks like a clear bug. Please, send a bug report in case it hasn't yet been reported to the Task Tracker.
    J-P Nurmi

  5. #5
    Join Date
    Aug 2007
    Posts
    27
    Qt products
    Qt4
    Platforms
    Unix/X11

    Wink Re: Styling a QComboBox

    Bug filed.

  6. #6
    Join Date
    Aug 2007
    Posts
    27
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Re: Styling a QComboBox

    While looking for the bug I submitted ( didn't note down the bug-id and now I can't seem to find it )... I stumbled upon this one:

    http://trolltech.com/developer/task-...ntry&id=166534

    Could be the solution or just a workaround... need to test it.

  7. #7
    Join Date
    Aug 2007
    Posts
    27
    Qt products
    Qt4
    Platforms
    Unix/X11

    Lightbulb Re: Styling a QComboBox

    Well that helped!

    Fixed it by adding something like this:

    Qt Code:
    1. border: 1px solid gray;
    2. }
    To copy to clipboard, switch view to plain text mode 

    I guess something got inherited wrong earlier...

    Anyway... good to know.

Similar Threads

  1. Style Sheet color of QComboBox
    By tpf80 in forum Qt Programming
    Replies: 6
    Last Post: 25th June 2007, 02:55
  2. using QComboBox as an ItemView
    By EricTheFruitbat in forum Qt Programming
    Replies: 3
    Last Post: 24th January 2007, 16:14
  3. QDataWidgetMapper <=> QComboBox best practice
    By saknopper in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2007, 10:50
  4. QcomboBox items
    By therealjag in forum Newbie
    Replies: 5
    Last Post: 27th March 2006, 08:21
  5. QComboBox +SUSE10.0 +qt4.1 strange behavior
    By antonio.r.tome in forum Qt Programming
    Replies: 6
    Last Post: 20th March 2006, 17:49

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.