Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Prevent <select> in QWebView (QComboBox) from hiding items
Qt 6.11 is out! See what's new in the release blog

Prevent <select> in QWebView (QComboBox) from hiding items

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 445 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sethcall
    wrote on last edited by sethcall
    #1

    In QWebPage, when I use Fusion style:

    view->setStyle(QStyleFactory::create("Fusion"));
    

    I notice that any <select> dropdown, when selected, does not show all items in the select. This is a really frustrating behavior. My select might have a total of 2 items, but the 1st item will be hidden (Qt will hide it with an up arrow, to hint to the user they need to scroll up to see it)

    I tried setting a style of a min-height:

    view->setStyleSheet("QComboBox QAbstractItemView {min-height:200px;}");
    

    And this did make the min-height be 200px successfully, but this leaves a bunch of dead white-space in the case of a select with 5 or less items. I'm not really looking for a min-height; I just wanted to see if I could successfully style it (I could). What I really want is to say, 'show all items, or at least, always show a minimum of # items'.

    Is there any way to do this?

    Thanks,
    Seth

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved