Hi

I am new to QT4 and are currently testing how to use the different widgets. I am used to win32 programming and therefore the QListWidget is getting on my nerves. The problem is that when using the windowsxpstyle I only select the item instead of the row when clicking an item. This is not the windowsxp way even though it is using the windowsxp style. I remember from win32 programming that listboxes usually allowed selecting a row and not only the item.

I changed the style to plastique and cleanlooks and then it worked as expected. I tried setting the SelectionBehavior to QAbstractItemView::SelectRows and that did not work.

What I want is to get a look that is as similar to regular win32 apps as possible.

The code:
Qt Code:
  1. #include <QApplication>
  2. #include <QListWidget>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication app(argc, argv);
  7.  
  8.  
  9. //list.setSelectionBehavior(QAbstractItemView::SelectRows);
  10.  
  11. list.addItem("Hello!");
  12. list.addItem("World!");
  13.  
  14. list.resize(200, 400);
  15. list.show();
  16.  
  17. return app.exec();
  18. }
To copy to clipboard, switch view to plain text mode 

Any ideas on how to get the list to behave as intended on windows?