2013年12月4日星期三

[Android] Neighborhoods QListWidget how to achieve multi-column !

check the afternoon of Qt documentation , Leng Shimo find the function set QListWidget multi-column display , only to set the number of rows or something. The landlord did not want to use QTabelWidget, so there is no way to ask you can achieve this functionality.
saying the landlord also feel that they have not simply packaged controls , have custom QListWidget, this is simply regret , but I am curious landlord ah , alas , curiosity killed Pathwalker !


------ Solution - -------------------------------------------
QTableWidget t;
t.setColumnCount (5);
------ Solution --------------------- -----------------------
setModelColumn (int column)
------ Solution ---- ----------------------------------------
not say , QListView than QListWidget greater flexibility , QListWidget achieve is to make the application simple and straightforward price is applicable where there is no QListView so extensive .

mvc method , you can refer to my http://blog.csdn.net/rabinsong/article/details/8452946
------ eference ---------- -----------------------------


Keke , QTableidget I know , but I just wanted to try to use QListWidget ...

------ eference - --------------------------------------

this can set it? Why do I use the afternoons ListWiget-> setModelColumn (5); did not respond. . . Or add the item in question ? How do you add the item to the second column of it ? No matter how , I can only add the item in the first column . . .

------ eference - --------------------------------------
replaced it with QTableWidget , QListWidget not provide this function , you can only display one column

Or you use qlistview to achieve it
------ eference ----------------------------- ----------
under QListview can not say how to achieve it ? Presumably inherited from QWidget QListView, QListView can be achieved , QListWidget should be able to achieve it , QListview is not by setModel () to set the Model to achieve it ?
------ eference --------------------------------------- < br> QListWidget with multiple layouts in a QWidget above everything OK
------ eference -------------------------- -------------


Well, good .
------ eference --------------------------------------- < br>

-, this way I would have thought , but really too fell a point, because relevant data even more than one property , then the display is really bad to be so troublesome ~ ~ with QListWiget, might as well go back to QTableWidget ~


------ eference - --------------------------------------

  
-, this way I would have thought , but really too fell a point, because relevant data even more than one property , then the display is really bad to be so troublesome ~ ~ with QListWiget, might as well go back to QTableWidget ~   
  
    
know QtableWidget Well ? Do not you know QListWidget is linear it?
------ eference --------------------------------------- < br> try setWrapping (true)

没有评论:

发表评论