[PyQt] QTreeWidgetItem with 2 row text

Saúl Ibarra saghul at gmail.com
Thu Aug 27 23:21:21 BST 2009


Well, that looks like a tille hack :) isn't there a widget which
accepts 2 row text, and an icon?


Thanks!

On Thu, Aug 27, 2009 at 1:31 PM, tabish
shaikh<tabish_shaikh555 at yahoo.com> wrote:
> use Listwidget instead of tree widget
>
> following is the snippet from the Chatting application i implemented:
> listItemMsg=QtGui.QListWidgetItem(str(message),listWidget, 0)
> listWidget.addItem(listItemMsgHeader)  #msg hear is one item
> listWidget.addItem(listItemMsg)              # actual msg is another item in
> the list
> listWidget.setCurrentItem(listItemMsg,QtGui.QItemSelectionModel.Deselect)
> #points the recent msg
>
>
> --- On Thu, 8/27/09, Saúl Ibarra <saghul at gmail.com> wrote:
>
> From: Saúl Ibarra <saghul at gmail.com>
> Subject: [PyQt] QTreeWidgetItem with 2 row text
> To: pyqt at riverbankcomputing.com
> Date: Thursday, August 27, 2009, 3:47 PM
>
> Hi all,
>
> I want to be able to insert a 2 row text ina  QTreeWidgetItem:
> something like the instant messaging applications, the first row would
> contain the name of the contact and the second row would contain some
> descriptive message in an smaller font size.
>
> Is there any other widget more suitable for this task? If there is no,
> how could I add this second row thing to the qtreewidgetitem?
>
>
> Thanks in advance,
>
> --
> /Saúl
> http://www.saghul.net | http://www.sipdoc.net
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
> start: 0000-00-00 end: 0000-00-00



-- 
/Saúl
http://www.saghul.net | http://www.sipdoc.net



More information about the PyQt mailing list