Results 1 to 2 of 2

Thread: Problems with QTableItem

  1. #1
    Join Date
    Jul 2006
    Location
    Cagliari - Sardinia - Italy
    Posts
    26
    Qt products
    Qt3
    Platforms
    Unix/X11
    Thanks
    1

    Question Problems with QTableItem

    Hello everybody. I'm a new entry in this forum

    I have a "problem" when I insert a QTableItem in a table.

    I've defined a my Item (is a simple combo: QComboTableItem doesn't work for my application) deriving it from QTableItem, and i have reimplemented createEditor() for this. Well... because I want do something when the user select an item from the combo, I've connected activated(int) signal of the combo with doValueChange slot of my table. I've also connected valueChaged(int, int) signal of the table with the slot "doSomething(int, int)" slot. The problem is that if i create the Item with QTableItem::Always the doSomething(int, int) slot receives (-1, -1) as parameters, insead of the correct row, col. If I create the Item with QTableItem::WhenCurrent, the slot receives the correct (row, col). Is it possible to have the correct (row, col) even if I create the item with QTableItem::Always?

    Thanks...

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Problems with QTableItem

    Hard to say. You could look at the source code of methods which emit the signal to check when -1, -1 are used as parameters. But maybe you don't need "Always" as the type? You can have an item which **looks like** a combobox and only when it is edited it **becomes** a combobox (for example using a pixmap and grabWidget() call).

Similar Threads

  1. Problems
    By euthymos in forum Installation and Deployment
    Replies: 2
    Last Post: 13th June 2006, 19:11
  2. Problem in SubClassing QTableItem.
    By sumsin in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2006, 10:21
  3. Problems building mysql plugin for Qt 4.1.2 on windows XP
    By Philip_Anselmo in forum Installation and Deployment
    Replies: 3
    Last Post: 17th May 2006, 15:38
  4. QT4 Plugins - problems, problems
    By NormanDunbar in forum Qt Programming
    Replies: 6
    Last Post: 9th May 2006, 15:39
  5. problems with Opengl
    By SlawQ in forum Qt Programming
    Replies: 4
    Last Post: 12th February 2006, 22:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.