Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6584671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:33:58+00:00 2026-05-25T16:33:58+00:00

I am using a QTableWidget. On the cellChanged()-signal I add or update a row

  • 0

I am using a QTableWidget. On the cellChanged()-signal I add or update a row in a sqlite database. After executing my SQL statements i want to add a button/CellWidget to an item in this row. As this is the change of a cell, it, of course, changes the content of the item and creates a loop.

How do i avoid this loop?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:33:59+00:00Added an answer on May 25, 2026 at 4:33 pm

    You have an other approach at your disposal. Using a mutex variable (a boolean for instance) that controls if you should add/update a row in your sql database, you can ignore the signal emited after executing SQL statements. The mutex variable can then be released after you added the button to the row.

    This approach is probably cheaper than disconnecting/connecting the signal/slot arround your automatic update action. If the signal is often triggered, this might be the solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a simple app with a table and an Add row button. Using
I'm using a QTabWidget to render multiple documents in a window, and I want
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
I've just started using Qt, so please bear with me. When I use QTableWidget->getItemAt(),
Using linq2sql I'm trying to take the string in txtOilChange and update the oilChange
I want a signal to be emitted when I either click on a cell
I'm using Qt4 to create a table, using the QTableWidget class. Problem is: I
I am using a QTableWidget for displaying data. I know that I can use
I have some code creating a QTabWidget from Python using PyQt4. I want to
I am using a QTableWidget to display and edit a data matrix. For validation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.