--===============1410461754== Content-Type: multipart/signed; boundary="nextPart1427477.hmVOa4fo3J"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1427477.hmVOa4fo3J Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 22. June 2009 15.41.26 Elvis Stansvik wrote: > > Storing pointers to the QTextFrame or even to the QTextTable is safe. > > They are QObjects so you can just use a QPointer for them for even more > > convenience. > > You mean I could use e.g. QMap, TableLayout> as a > container that maps the QTextTables to their corresponding layout > objects. Is that really safe? Over dinner I thought of a method that may just work perfectly for this=20 situation. We have a QMap m_tables; and the moment we insert a table we do a; connect (table, SIGNAL(destroyed(QObject*)), this,=20 SLOT(tableDeleted(QObject*))); in the tableDeleted we can then properly get rid of the table in the map,=20 and clean up the data too. This should also solve your question of having one TableLayout per table;=20 you can indeed have one data object per table but you should probably be ok= =20 with one TableLayout object per QTextDocument. Cheers! =2D-=20 Thomas Zander --nextPart1427477.hmVOa4fo3J Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAko/yrEACgkQCojCW6H2z/Rj/wCg5l5RL1fgLDnv1wuIs1JmwsKa XAsAn0QOvF79u0Kc3s+FaW2SmPKBzwl0 =+jfJ -----END PGP SIGNATURE----- --nextPart1427477.hmVOa4fo3J-- --===============1410461754== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel --===============1410461754==--