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. widgets: mini combo-box (popup) draws wrong on windows
Forum Updated to NodeBB v4.3 + New Features

widgets: mini combo-box (popup) draws wrong on windows

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 413 Views 2 Watching
  • 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.
  • D Offline
    D Offline
    davecotter
    wrote on last edited by
    #1

    on mac, i have a "mini" style popup (combo-box), looks like this:

    mac appearance.png

    See the dual up/down chevrons to the right of the genre text edit? that is a combo box just made small. looks good. and it pops up correctly:

    mac good.png

    On Windows, it looks fine when not popped up, but when it IS, it's totally broken:

    win bad.png

    is there a way to have the unclicked control be one width, but the dropdown list view be a different width? it works in the previous iteration of my app (32bit):

    win good.png

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      How did you implement that combo box ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        davecotter
        wrote on last edited by davecotter
        #3

        It's just a regular text edit, then next to it a "popup" menu that is shrunk real small.

        This is a legacy app (with 15+ years of old code) that must compile under xcode (10.14 carbon), Visual Studio (2008 win32), and Qt (mac and win). There is no "combo box" API on mac, so this was the way it was done "back in the day". I just ported the code to Qt.

        It seems I may need to just have a bit of custom code then for Qt to make it a "real" combo-box?

        But it would make the code SO much simpler (and i wouldn't have to have more than one line of "special case" code) if i could just tell the menu that shows to be wider?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Well, then how did you implement that popup menu ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • D Offline
            D Offline
            davecotter
            wrote on last edited by
            #5

            in Qt, it's a combobox, just small horizontally.
            i want it to draw small, but pop up BIG (wide)

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Then you will likely have to create a subclass and reimplement the showPopup method to adjust the size of the pop on Windows.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              2

              • Login

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