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. [Solved]SIGSEGV after delete QComboBox
Forum Updated to NodeBB v4.3 + New Features

[Solved]SIGSEGV after delete QComboBox

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.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
    Beka
    wrote on last edited by
    #1

    I have a QDialog, where I have QTableView and throug method setIndexWidget I am inserting there QComboBoxes, but after I delete QComboBox and close dialog through this->close or i want to sort the table, it crash in SIGSEGV... now i dont know what to do

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DerManu
      wrote on last edited by
      #2

      Read the documentation to setIndexWidget. It says:
      Sets the given widget on the item at the given index, passing the ownership of the widget to the viewport.
      So you're not allowed to delete it yourself but only by calling setIndexWidget again with another widget (or probably 0).

      Are you sure you want setIndexWidget and not QStyledItemDelegate?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Beka
        wrote on last edited by
        #3

        Thank you, its working kow, but know i have the problem with setIndexWidget in otehr place, because I'm setting it too many times, and it is very slow, do you think that QStyledItemDelegate will be quicker?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DerManu
          wrote on last edited by
          #4

          Yes, probably. QStyledItemDelegate might be the correct thing to use anyhow, in your case, but you haven't said much about your application.

          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