title: problem of adding a QPushButton using setItemWidget inside QListWidgetItem
body: <p>I want to add a QPushButton inside ListItm, so I have implemented the code as given below. But the button comes in the middle of the list, actually I want it at the lower end of the list item. How is it possible. Also that button click event is not working. Actually I want to disable the item click event directly and by clicking the button inside the QListWidgetItem, I want to enable the item click event. But I am not able to perform this operation. How to do this? I have used the following code snippet:</p>
  
  <pre><code>list=new QListWidget(this);
  // list-&gt;setStyleSheet("* { background-color:rgb(0,0,0); padding: 10px ; color:rgb(255,255,255)}");
  list-&gt;setGeometry(0,61,360,475);
  list-&gt;setSortingEnabled(true);
  //connect(list,SIGNAL(itemClicked(QListWidgetItem*)),this,SLOT(ItemClicked(QListWidgetItem*)));
  
  item=new QListWidgetItem();
  item-&gt;setIcon(QIcon(":/images/Icon.png"));
  item-&gt;setText("Item1");
  item-&gt;setSizeHint(QSize(80,80));
  item-&gt;setBackgroundColor(QColor(200,255,100));
  
  list-&gt;addItem(item);
  QPushButton *but = new QPushButton("&gt;");
  but-&gt;setMaximumSize(50,80);
  but-&gt;setFlat(true);
  // but-&gt;setGeometry(QRect(500,100,100,100));
  but-&gt;setStyleSheet("background: transparent; border: none");
  QHBoxLayout *layout= new QHBoxLayout();
  layout-&gt;addWidget(but);
  QWidget *widget = new QWidget();
  widget-&gt;setLayout(layout);
  item-&gt;setSizeHint(widget-&gt;sizeHint());
  list-&gt;setItemWidget(item, widget);
  connect(but, SIGNAL(clicked()), this, SLOT(ItemClicked()));
  #if defined(Q_WS_S60)
  list-&gt;showMaximized();
  #else
  list-&gt;show();
  #endif
  
  ItemClicked()
  {
  int Index = list-&gt;currentIndex().row();//Always getting this Index as -1
  }
  </code></pre>
  
  <p>Please have a look on the above code and provide your suggestions.
  Thanks... </p>