Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

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

    General and Desktop
    1
    1
    329
    Loading More Posts
    • 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
      sethcall last edited by sethcall

      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 Reply Quote 0
      • First post
        Last post