c++ - QTableWidget display certain number of rows at a time -


i have large qtablewidget. let's 200 rows. in qlistwidget, there setmaxvisibleitems(30), extremely useful. what's equivalent qtablewidget, except rows. ie. setmaxvisiblerows?

i considered setting max height window. however, application can used on varying dpis. so, may small some. plus, felt needless restriction.

i saw this: how show 30 rows , hide remaining rows of qtablewidget

however, isn't same means.

thank in advanced!

the best way use qt's void qtableview::setrowhidden(int row, bool hide)

void qtableview::setrowhidden(int row, bool hide):

if hide true row hidden, otherwise shown.

if know count of table can use othewise have use model , use rowcount().

then for loop should easy:

for(int = starthidinghere; < numofrows; i++)     mytable->setrowhidden(i, true); 

you can similar method un-hide them. method works great filters if needed in future.

other possible useful methods:

bool qtableview::isrowhidden(int row);  void qtableview::setcolumnhidden(int column, bool hide);  void qtableview::setmodel(qabstractitemmodel *model); ->   int qabstractitemmodel::rowcount(const qmodelindex & parent = qmodelindex()) const 

Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -