Qt

From NetHackWiki
(Redirected from Nethack-qt)
Jump to: navigation, search
NetHack 3.4.3's Qt port, showing a monk in Sokoban.

Qt is a GUI toolkit developed by Trolltech and now controlled by the Qt Project. It is the native graphical API for KDE and as such is available for all of the main Linux distributions.

NetHack offers an interface based on Qt, compatible with Qt through version 3. It is not compatible with Qt 4 or 5. Because Qt 5 is the current version, the Qt interface is difficult to build on modern systems. Furthermore, the NetHack 3.6.0 source has a corrupt version of include/qt_xpms.h (bug S360-2); the version of this file from NetHack 3.4.3 must be substituted.

As of 21 October 2017, a revised interface compatible with Qt 4 and 5 is available in the development version of NetHack.

Features of the Qt interface

The Qt interface supports tiles and text display. It uses tiled mode by default, but the text mode display can be enabled by setting the ascii_map option. Due to a bug, it is necessary to redraw the map (press control-R) after changing ascii_map.

A user has suggested improving this page or section as follows:

"Note how to set item counts in the inventory display"

Special configuration options

The Qt interface supports a number of unique options in the configuration file; as only Unix supports Qt, this will be ~/.nethackrc . Some of these can be set from the Game|Qt Options... menu entry.

Option Values Meaning
QT_TILEWIDTH 1 to 64 Width of tiles as displayed
QT_TILEHEIGHT 1 to 64 Height of tiles as displayed
QT_FONTSIZE t, s, m, l, h Size of fonts used on the screen: tiny, small, medium, large, huge
QT_COMPACT 0 or 1 If 1, the message and status windows are on separate pages from the map, and the map is

enlarged to cover most of the screen except for a single line for the messages.

Note that QT_TILEWIDTH and QT_TILEHEIGHT are the size of the tiles as displayed, not as stored in the tileset. If using Absurd64, for example, you would set OPTIONS=tile_width:64,tile_height:64 as always, but QT_TILEWIDTH and QT_TILEHEIGHT can resize the tiles to whatever size you want.

A user has suggested improving this page or section as follows:

"Get a screenshot of the compact mode"