Re: [PyQt] Adding a table to GUI in QT Designer
Thanks Tony. I was able to add a context menu to the table with the functionality I need and now can CutPaste from excel to my code with no problems. One issue I still have is that I have 4 tabs in my program and each tab has its own table. In order to cut and paste to the correct table (with its associated name) I am having to re-write the code for each table individually, which I know is redundant and bad programming, but I don't know a way around it. To solve this problem, is there a way for the program to: 1. Track the location of the mouse in the program and when it is located ONLY over a table to activate the QMenu context menu; 2. When it is located over a certain table to report the name of that table back? That way I could simplify my code. Thanks, Nader Abedrabbo yes it's possible to do that... read about QMenu classes to do the right click and maybe visit here to other examples http://www.rkblog.rk.edu.pl/w/p/python/#3 2011/8/22 Nader Abedrabbo aenad...@yahoo.com -- View this message in context: http://old.nabble.com/Adding-a-table-to-GUI-in-QT-Designer-tp32313584p32326763.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Adding a table to GUI in QT Designer
Greetings, I am new to PyQt. I am creating a GUI for a program I created in Python and I need to add a table with advanced functions in it. I am able to use QTableWidget to create the table, but there is no right click functionality to the table. I need to create a table to do these things: 1. Right click to perform a Cut Paste of data from Excel, clear data and so on that are usually available in other advanced softwares. 2. The number of rows in the table should be dynamically adjusted to the number of data being pasted. Is that functionality possible in PyQt? Thanks, Nader -- View this message in context: http://old.nabble.com/Adding-a-table-to-GUI-in-QT-Designer-tp32313584p32313584.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Adding a table to GUI in QT Designer
yes it's possible to do that... read about QMenu classes to do the right click and maybe visit here to other examples http://www.rkblog.rk.edu.pl/w/p/python/#3 2011/8/22 Nader Abedrabbo aenad...@yahoo.com Greetings, I am new to PyQt. I am creating a GUI for a program I created in Python and I need to add a table with advanced functions in it. I am able to use QTableWidget to create the table, but there is no right click functionality to the table. I need to create a table to do these things: 1. Right click to perform a Cut Paste of data from Excel, clear data and so on that are usually available in other advanced softwares. 2. The number of rows in the table should be dynamically adjusted to the number of data being pasted. Is that functionality possible in PyQt? Thanks, Nader -- View this message in context: http://old.nabble.com/Adding-a-table-to-GUI-in-QT-Designer-tp32313584p32313584.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt -- Antonio Peña Secure email with PGP 0x8B021001 available at http://pgp.mit.edu Fingerprint: 74E6 2974 B090 366D CE71 7BB2 6476 FA09 8B02 1001 ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt