Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Adding tags to qt project

    General and Desktop
    2
    4
    764
    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.
    • N
      NS_19 last edited by

      I am new to QT.I am using Qt5.3.
      I have a combobox in ui file which displays a set of values.How can i add a functionality where each value selected from combobox appears as tag with a cross so that user can remove a tag anytime.Finally it would result in multiple tags based on selections done from combobox.

      Secondly is there a way to make combobox work in such a way that when user types an alphabet for searching a value, only the values starting from that alphabet appears in combobox.

      Thanks for the help in advance.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        For the value filtering, you can have a look at "QCompleter":http://qt-project.org/doc/qt-5/qcompleter.html

        Are you trying to implement with QWidgets the site tagging functionality ?

        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 Reply Quote 0
        • N
          NS_19 last edited by

          yes i used qcompleter for value filtereing.
          yes basically each value selected from combobox should appear as a new tag

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Then add a slot that reacts on the currentIndexChanged(const QString &text) signal and update the QLabel content with that text

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