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. QLineEdit with Custom QComboBox
Forum Updated to NodeBB v4.3 + New Features

QLineEdit with Custom QComboBox

Scheduled Pinned Locked Moved General and Desktop
8 Posts 5 Posters 11.0k Views 1 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.
  • B Offline
    B Offline
    bahonurn
    wrote on last edited by
    #1

    Hi guys i am pretty new to Qt and now trying to make a simple dictionary application and i wanted to customize the QLineEdit with QComboBox inside like u get a search box with magnifier icon and down arrow right next to it and u can choose from the options right inside the QLineEdit. The idea seems easy to realize as i inherited QLineEdit and used a new QComboBox inside and i managed to get QComboBox inside the QLine edit with magnifier or any icons but the problem is the down arrow of QComboBox cant be set closer to the icons like almost overlaps little bit from left small down arrow i tries different styleSheet stuffs but still the distance between down arrow and the icon is not changed... Any suggestions will be appreciated..

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      I don't know exactly what you want, but could a editable QComboBox be a solution for you?

      Another guess might be to use the input widget in the locator of Qt Creator. I don't know if it is available as a more or less standalone widget.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mohsen
        wrote on last edited by
        #3

        @Volker: I guess he needs an autofill textbox.

        you could use same combobox and make it appear like textbox using style http://developer.qt.nokia.com/forums/viewthread/3150

        then you can design a combo box with your theme by placing a button to expand combo box where ever you want.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bahonurn
          wrote on last edited by
          #4

          thanks for the replies but the thing is i want like a input box with icon and down arrow before the input itself where one can click the arrow next to the icon and choose different options to search like hmm english or other alternative languages

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #5

            Can you show us a picture, of what you want to achieve? that would make it clearer...

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0
            • B Offline
              B Offline
              bahonurn
              wrote on last edited by
              #6

              Here i am attaching the link where it shows a simple iTunes search box. As u see it has magnifier glass with drop down options to search. So that is almost what i want to do if that is realizable in Qt. Thanks Guys :)!http://lifehacker.com/246006/add-search-keyboard-shortcut-to-itunes-on-your-mac()!

              1 Reply Last reply
              0
              • G Offline
                G Offline
                goetz
                wrote on last edited by
                #7

                This is what Qt Creator uses in its locator on the bottom. Maybe it's not too hard to extract it from its sources.

                http://www.catb.org/~esr/faqs/smart-questions.html

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dangelog
                  wrote on last edited by
                  #8

                  It's a customized QLineEdit with a QCompleter with QCompleter::PopupCompletion.

                  Software Engineer
                  KDAB (UK) Ltd., a KDAB Group company

                  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