Results 1 to 4 of 4

Thread: QTableWidget and DoubleClicked(QtableWidgetItem *) problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Aug 2007
    Location
    Wroclaw
    Posts
    20
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: QTableWidget and DoubleClicked(QtableWidgetItem *) problem

    Important code:

    Qt Code:
    1. class1
    2. {
    3. class1
    4. {
    5. ...
    6. connect(this->ui.List,SIGNAL(itemDoubleClicked(QTableWidgetItem *)),this,SLOT(slot1(QTableWidgetItem *)));
    7. ...less important things
    8. }
    9.  
    10. ...
    11. slot1
    12. {
    13. emit this->anotherView();
    14. }
    15. }
    To copy to clipboard, switch view to plain text mode 

    and in main class:

    Qt Code:
    1. MainClass
    2. {
    3. ...
    4. //anotherView run this method:
    5. void changeanotherWidget(){
    6. QWidget *buffor;
    7. buffor = this->centralWidget();
    8. if(buffor)
    9. delete buffor;
    10.  
    11. this->anotherWidget= new AnotherWidget();
    12. this->setCentralWidget(viewPatient);
    13.  
    14. ...
    15. //some connections
    16. ...
    17. }
    18. }
    To copy to clipboard, switch view to plain text mode 

    there is no more, i connect to signal anotherView only this slot

    QObject::deleteLater -- don't help
    Last edited by skrzypu; 11th August 2007 at 10:02. Reason: answer to one more post

Similar Threads

  1. experiencing problem at printing out QTableWidget
    By rmagro in forum Qt Programming
    Replies: 9
    Last Post: 27th June 2007, 16:04
  2. QTableWidget Problem, setRowWidget? :P
    By VireX in forum Newbie
    Replies: 17
    Last Post: 6th April 2007, 18:12
  3. QTableWidget editing question
    By Trasmeister in forum Qt Programming
    Replies: 1
    Last Post: 20th September 2006, 18:46
  4. Problem inserting in QTableWidget
    By DPinLV in forum Qt Programming
    Replies: 2
    Last Post: 2nd August 2006, 00:10
  5. Replies: 6
    Last Post: 5th March 2006, 21:05

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.