Results 1 to 3 of 3

Thread: Using QPushButton in QTableWidget

  1. #1
    Join Date
    Apr 2008
    Posts
    35
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Using QPushButton in QTableWidget

    Hi guys,

    i am working on automatic file sorting and having problems with the interface mainly with the tablewidget

    1. I need a tablewidget with four columns :- File name (Line Edit), Move (ComboBox), Browse (PushButton), Ignore (Pushbutton). I have a delegate which handles lineedit, spinbox and combobox. have no idea how to use pushbutton in delegate.

    2. when i click on the browse button, file dialog opens and returns a absolute path. this path have to be added and set as current index in the Move combobox

    3. Ignore button removes the table widget row..

    Thanks for your help

    Arpit

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Using QPushButton in QTableWidget

    If you just want a button that does not manipulate any model data, use setIndexWidget
    It's nice to be important but it's more important to be nice.

  3. The following user says thank you to axeljaeger for this useful post:

    ShaChris23 (1st September 2010)

  4. #3
    Join Date
    Apr 2007
    Posts
    62
    Thanks
    43
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Using QPushButton in QTableWidget

    Or you could also use QTableWidget::setCellWidget(QWidget * widget ); and pass QPushButton * to it?

Similar Threads

  1. QPushButton
    By anafor2004 in forum Newbie
    Replies: 1
    Last Post: 21st October 2009, 16:31
  2. QPushButton question
    By [Po]lentino in forum Newbie
    Replies: 2
    Last Post: 28th March 2009, 14:28
  3. Qpushbutton
    By iamhere in forum Qt Programming
    Replies: 5
    Last Post: 15th October 2008, 04:40
  4. Multiline QPushButton
    By uestebanez in forum Qt Programming
    Replies: 4
    Last Post: 12th October 2008, 21:25
  5. Replies: 3
    Last Post: 26th September 2006, 12:16

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.