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. Custom item delegate with multiple combo boxes
Forum Updated to NodeBB v4.3 + New Features

Custom item delegate with multiple combo boxes

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 3.9k 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
    bright day
    wrote on last edited by
    #1

    Hi! I'm trying to do the following :
    While editing a table cell user should have several comboboxes, which are replaced with text after the choises are made (e.g.:)
    |..........cb1,cb2,cb3...........|
    |................cb4.................|

    (text in the centre of a cell)

    1. When comboboxes have been replaced with text, user should be able to add another group of comboboxes to THE SAME cell, like this
      |...t1,t2,t3.....cb1,cb2,cb3...|
      |.......t4.............cb4..........|

    2. The user's choices in each group of comboboxes should update SQL table.

    3. Text, which appears after choice should have basic formatting (bold,italic)

    How shall I do this? implement a delegate, or implement widget with comboboxes, and set cell widgets in QTableWidget, or what?
    Need some advice.

    Thanx in advance!

    Edit: As requested by poster, original posting was modified to reflect this second, more elaborate version; Andre

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

      What do you want to do? Several combo boxes in one cell sounds very weird.

      Did you look at the SQL table models yet?

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

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        I just merged in the above posting (which used to be a separate topic) into this topic, as it seems to concern the same problem. Please keep a single issue in a single topic.

        Edit:
        At users request, the first posting was replaced by the posting that was above this one originally.

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

          my first posting used to be a reply in another topic, moderators made this topic of that reply. I would appreciate, if you deleted first posting, and make topic of the second posting. (people get embarrassed with first). thank you.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

            [quote author="bright day" date="1305294528"]my first posting used to be a reply in another topic, moderators made this topic of that reply. I would appreciate, if you deleted first posting, and make topic of the second posting. (people get embarrassed with first). thank you.[/quote]
            Done. I hope this suits you better?

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

              It does ) Thank you.

              bq. Did you look at the SQL table models yet?

              I did a little, I'm new to Qt and would appreciate any advice to pick the right way.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #7

                Well, the usage pattern you describe is not very clear (especially the part about changing to text, and then be able to add another block of combo boxes) and, for so far it is clear, looks very strange. I think we're going to need more details on this, and I also think you should perhaps re-think your UI design...

                There is a reason why what you want is complicated, and that is because it probably is not a good idea.*

                *) I don't mean to imply that everything that is complicated is a bad idea though

                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