Difference between revisions of "Qt"

From NetHackWiki
Jump to navigation Jump to search
(Special configuration options: Clarification regarding tile sizes)
(Update for 3.6.0; compatibility notes)
Line 1: Line 1:
 
[[Image:Sokoban-Qt.png|thumbnail|right|200px|NetHack 3.4.3's Qt port, showing a monk in [[Sokoban]].]]
 
[[Image:Sokoban-Qt.png|thumbnail|right|200px|NetHack 3.4.3's Qt port, showing a monk in [[Sokoban]].]]
'''Qt''' is a [[GUI]] toolkit developed by Trolltech and now controlled by [[wikipedia:Nokia|Nokia]].  It is the native graphical API for [[wikipedia:KDE|KDE]] and as such is available for all of the main [[wikipedia:Linux|Linux]] distributions.
+
'''Qt''' is a [[GUI]] toolkit developed by Trolltech and now controlled by [[wikipedia:Qt|the Qt Project]].  It is the native graphical API for [[wikipedia:KDE|KDE]] and as such is available for all of the main [[wikipedia:Linux|Linux]] distributions.
  
NetHack offers an interface based on Qt, compatible with Qt through version 3.  It is not compatible with Qt 4, which is the current version, nor with the forthcoming Qt 5.
+
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 ([[Bugs in NetHack 3.6.0#Build-from-source bugs|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==
 
==Features of the Qt interface==
Line 29: Line 31:
 
{{todo|Get a screenshot of the compact mode}}
 
{{todo|Get a screenshot of the compact mode}}
  
{{nethack-343}}
+
{{nethack-360}}
 
[[Category:User interface]]
 
[[Category:User interface]]

Revision as of 04:29, 23 October 2017

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"


This page may need to be updated for the current version of NetHack.

It may contain text specific to NetHack 3.6.0. Information on this page may be out of date.

Editors: After reviewing this page and making necessary edits, please change the {{nethack-360}} tag to the current version's tag or {{noversion}} as appropriate.