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]QListWidget reseting in run, not debug.
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]QListWidget reseting in run, not debug.

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 950 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.
  • W Offline
    W Offline
    weblife
    wrote on last edited by
    #1

    I have a QListWidget that will set my desired selection but for some reason on "mouse click up" it resets to the first item in the list. This only happens when I run without debug on, if debug is on it wont reset. Here is what I am doing:

    I have a QTableWidget with a bunch of record populated. If I click once it poplates my QListWidget with that row of records. If I double-click QTableWidget cell it will populate QListWidget with the row record and select the cell in the QListWidget.

    Here is my function:

    @
    setDataItem(int item){
    ui->listData->itemSelectionChanged();
    ui->listData->item(item)->setSelected(true);
    }
    @

    Could this be a bug to report?

    Brandon Clark
    www.themindspot.com

    1 Reply Last reply
    0
    • W Offline
      W Offline
      weblife
      wrote on last edited by
      #2

      Solved! The issue was there was a single and double click SIGNAL being made. I chnaged the single click to cellEntered and it works great.

      Brandon Clark
      www.themindspot.com

      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