MCPcopy Create free account
hub / github.com/NetHack/NetHack / TotalWidth

Method TotalWidth

win/Qt/qt_menu.h:22–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 NetHackQtTextListBox(QWidget* parent = NULL) : QListWidget(parent) { }
21
22 int TotalWidth() const
23 {
24 int width = 0;
25 QFontMetrics fm(font());
26 for (int i = 0; i < count(); i++) {
27 int lwidth = fm.QFM_WIDTH(item(i)->text());
28 width = std::max(width, lwidth);
29 }
30 return width;
31 }
32 int TotalHeight() const
33 {
34 QFontMetrics fm(font());

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected