bitcoin/src/qt
Russell Yanofsky 865ee1af20 Fix Qt test broken by #22219
It looks like this should have been caught by CI but perhaps there was a
conflict with a recently merged PR. Failure reported by fanquake <fanquake@gmail.com>
https://github.com/bitcoin/bitcoin/pull/22219#issuecomment-920496509
2021-09-15 22:22:10 -04:00
..
android Add src/qt/android/.gitignore 2021-05-26 23:29:19 +03:00
forms qt: add missing tooltips to options menu settings 2021-09-13 01:58:41 -04:00
locale qt: Handle new added plurals in bitcoin_en.ts 2021-08-22 00:03:31 +03:00
res
test Fix Qt test broken by #22219 2021-09-15 22:22:10 -04:00
Makefile
README.md
addressbookpage.cpp qt: ensure translator comments end in full stop 2021-09-12 18:25:06 -04:00
addressbookpage.h
addresstablemodel.cpp
addresstablemodel.h
askpassphrasedialog.cpp
askpassphrasedialog.h
bantablemodel.cpp
bantablemodel.h Fix addrdb includes 2021-09-07 10:44:48 +02:00
bitcoin.cpp Start using init makeNode, makeChain, etc methods 2021-08-17 03:05:15 -05:00
bitcoin.h Start using init makeNode, makeChain, etc methods 2021-08-17 03:05:15 -05:00
bitcoin.qrc
bitcoin_locale.qrc
bitcoinaddressvalidator.cpp
bitcoinaddressvalidator.h
bitcoinamountfield.cpp
bitcoinamountfield.h
bitcoingui.cpp qt, refactor: Replace WalletFrame::addWallet with WalletFrame::addView 2021-09-03 00:27:14 +03:00
bitcoingui.h Merge bitcoin-core/gui#309: Add access to the Peers tab from the network icon 2021-05-31 19:37:44 +03:00
bitcoinstrings.cpp Translations update 2021-07-01 17:16:14 +03:00
bitcoinunits.cpp
bitcoinunits.h
clientmodel.cpp refactor: replace QDateTime::fromTime_t with QDateTime::fromSecsSinceEpoch 2021-08-24 15:06:46 +08:00
clientmodel.h
coincontroldialog.cpp GUI: Always call parent changeEvent handler 2021-06-22 19:24:44 +00:00
coincontroldialog.h
coincontroltreewidget.cpp
coincontroltreewidget.h
createwalletdialog.cpp gui: ensure external signer option remains disabled without signers 2021-08-05 23:27:53 -04:00
createwalletdialog.h gui: ensure external signer option remains disabled without signers 2021-08-05 23:27:53 -04:00
csvmodelwriter.cpp
csvmodelwriter.h
editaddressdialog.cpp
editaddressdialog.h
guiconstants.h
guiutil.cpp refactor: replace QDateTime::fromTime_t with QDateTime::fromSecsSinceEpoch 2021-08-24 15:06:46 +08:00
guiutil.h Merge bitcoin-core/gui#275: Support runtime appearance adjustment on macOS 2021-05-28 18:07:44 +03:00
initexecutor.cpp qt, refactor: Fix code styling of moved InitExecutor class 2021-07-14 21:54:32 +03:00
initexecutor.h qt, refactor: Fix code styling of moved InitExecutor class 2021-07-14 21:54:32 +03:00
intro.cpp
intro.h
macdockiconhandler.h
macdockiconhandler.mm
macnotificationhandler.h
macnotificationhandler.mm
macos_appnap.h
macos_appnap.mm
main.cpp
modaloverlay.cpp
modaloverlay.h
networkstyle.cpp
networkstyle.h
notificator.cpp
notificator.h
openuridialog.cpp
openuridialog.h
optionsdialog.cpp Merge bitcoin-core/gui#391: Add cancel button to configuration options popup 2021-09-12 19:21:55 +03:00
optionsdialog.h
optionsmodel.cpp qt: Add SubFeeFromAmount option 2021-08-11 14:48:24 +05:30
optionsmodel.h qt: Add SubFeeFromAmount option 2021-08-11 14:48:24 +05:30
overviewpage.cpp Merge bitcoin-core/gui#365: Draw "eye" sign at the beginning of watch-only addresses 2021-07-05 23:48:21 +03:00
overviewpage.h qt: Drop redundant OverviewPage::handleOutOfSyncWarningClicks slot 2021-06-06 01:04:15 +03:00
paymentserver.cpp
paymentserver.h
peertablemodel.cpp Remove GetAddrName 2021-08-26 10:44:26 +02:00
peertablemodel.h Merge bitcoin-core/gui#317: Add Direction column to Peers Tab 2021-08-11 16:55:36 +03:00
peertablesortproxy.cpp Remove GetAddrName 2021-08-26 10:44:26 +02:00
peertablesortproxy.h
platformstyle.cpp
platformstyle.h
psbtoperationsdialog.cpp qt: Add Load PSBT functionaliy with nowallet 2021-08-11 15:40:39 +05:30
psbtoperationsdialog.h
qrimagewidget.cpp qt: ensure translator comments end in full stop 2021-09-12 18:25:06 -04:00
qrimagewidget.h
qvalidatedlineedit.cpp
qvalidatedlineedit.h
qvaluecombobox.cpp
qvaluecombobox.h
receivecoinsdialog.cpp GUI: Add keyboard shortcuts for other context menus 2021-06-12 19:39:38 +00:00
receivecoinsdialog.h
receiverequestdialog.cpp gui: misc external signer fixes and translation hints 2021-06-16 10:48:58 +02:00
receiverequestdialog.h
recentrequeststablemodel.cpp refactor: replace QDateTime::toTime_t with QDateTime::toSecsSinceEpoch 2021-08-24 15:08:04 +08:00
recentrequeststablemodel.h refactor: replace QDateTime::toTime_t with QDateTime::toSecsSinceEpoch 2021-08-24 15:08:04 +08:00
rpcconsole.cpp qt: ensure translator comments end in full stop 2021-09-12 18:25:06 -04:00
rpcconsole.h qt: Save/restore column sizes of the tables in the Peers tab 2021-06-05 13:36:53 +03:00
sendcoinsdialog.cpp qt: ensure translator comments end in full stop 2021-09-12 18:25:06 -04:00
sendcoinsdialog.h
sendcoinsentry.cpp qt: Add SubFeeFromAmount option 2021-08-11 14:48:24 +05:30
sendcoinsentry.h
sendcoinsrecipient.h
signverifymessagedialog.cpp GUI: Always call parent changeEvent handler 2021-06-22 19:24:44 +00:00
signverifymessagedialog.h
splashscreen.cpp
splashscreen.h
trafficgraphwidget.cpp
trafficgraphwidget.h
transactiondesc.cpp
transactiondesc.h
transactiondescdialog.cpp
transactiondescdialog.h
transactionfilterproxy.cpp refactor: replace QDateTime::fromTime_t with QDateTime::fromSecsSinceEpoch 2021-08-24 15:06:46 +08:00
transactionfilterproxy.h qt: Refactor open date range to use std::optional 2021-06-11 23:39:19 +01:00
transactionoverviewwidget.h
transactionrecord.cpp
transactionrecord.h
transactiontablemodel.cpp refactor: replace QDateTime::fromTime_t with QDateTime::fromSecsSinceEpoch 2021-08-24 15:06:46 +08:00
transactiontablemodel.h
transactionview.cpp qt: ensure translator comments end in full stop 2021-09-12 18:25:06 -04:00
transactionview.h
utilitydialog.cpp
utilitydialog.h
walletcontroller.cpp refactor: reduce #ifdef ENABLE_EXTERNAL_SIGNER usage 2021-06-16 10:48:58 +02:00
walletcontroller.h
walletframe.cpp Move addrman includes from .h to .cpp 2021-09-07 10:44:43 +02:00
walletframe.h qt, refactor: Replace WalletFrame::addWallet with WalletFrame::addView 2021-09-03 00:27:14 +03:00
walletmodel.cpp Rearrange fillPSBT arguments 2021-06-10 10:58:45 -04:00
walletmodel.h Merge bitcoin-core/gui#4: UI external signer support (e.g. hardware wallet) 2021-06-09 18:59:59 +12:00
walletmodeltransaction.cpp gui: send using external signer 2021-05-27 14:37:59 +02:00
walletmodeltransaction.h gui: send using external signer 2021-05-27 14:37:59 +02:00
walletview.cpp qt, refactor: Drop redundant checks of walletModel 2021-08-26 16:28:00 +03:00
walletview.h qt, refactor: Declare getWalletModel with const and noexcept qualifiers 2021-08-26 16:28:00 +03:00
winshutdownmonitor.cpp
winshutdownmonitor.h

README.md

This directory contains the source code for the Bitcoin Core graphical user interface (GUI). It uses the Qt cross-platform framework.

The current precise version for Qt 5 is specified in qt.mk.

Compile and run

See build instructions: Unix, macOS, Windows, FreeBSD, NetBSD, OpenBSD

When following your systems build instructions, make sure to install the Qt dependencies.

To run:

./src/qt/bitcoin-qt

Files and Directories

forms/

  • A directory that contains Designer UI files. These files specify the characteristics of form elements in XML. Qt UI files can be edited with Qt Creator or using any text editor.

locale/

  • Contains translations. They are periodically updated and an effort is made to support as many languages as possible. The process of contributing translations is described in doc/translation_process.md.

res/

  • Contains graphical resources used to enhance the UI experience.

test/

  • Functional tests used to ensure proper functionality of the GUI. Significant changes to the GUI code normally require new or updated tests.

bitcoingui.(h/cpp)

  • Represents the main window of the Bitcoin UI.

*model.(h/cpp)

  • The model. When it has a corresponding controller, it generally inherits from QAbstractTableModel. Models that are used by controllers as helpers inherit from other Qt classes like QValidator.
  • ClientModel is used by the main application bitcoingui and several models like peertablemodel.

*page.(h/cpp)

  • A controller. :NAMEpage.cpp generally includes :NAMEmodel.h and forms/:NAME.page.ui with a similar :NAME.

*dialog.(h/cpp)

  • Various dialogs, e.g. to open a URL. Inherit from QDialog.

paymentserver.(h/cpp)

  • (Deprecated) Used to process BIP21 payment URI requests. Also handles URI-based application switching (e.g. when following a bitcoin:... link from a browser).

walletview.(h/cpp)

  • Represents the view to a single wallet.

Other .h/cpp files

  • UI elements like BitcoinAmountField, which inherit from QWidget.
  • bitcoinstrings.cpp: automatically generated
  • bitcoinunits.(h/cpp): BTC / mBTC / etc. handling
  • callback.h
  • guiconstants.h: UI colors, app name, etc.
  • guiutil.h: several helper functions
  • macdockiconhandler.(h/mm): macOS dock icon handler
  • macnotificationhandler.(h/mm): display notifications in macOS

Contribute

See CONTRIBUTING.md for general guidelines.

Note: Do not change local/bitcoin_en.ts. It is updated automatically.

Using Qt Creator as an IDE

Qt Creator is a powerful tool which packages a UI designer tool (Qt Designer) and a C++ IDE into one application. This is especially useful if you want to change the UI layout.

Download Qt Creator

On Unix and macOS, Qt Creator can be installed through your package manager. Alternatively, you can download a binary from the Qt Website.

Note: If installing from a binary grabbed from the Qt Website: During the installation process, uncheck everything except for Qt Creator.

macOS
brew install qt-creator
Ubuntu & Debian
sudo apt-get install qtcreator

Setup Qt Creator

  1. Make sure you've installed all dependencies specified in your systems build instructions
  2. Follow the compile instructions for your system, run ./configure with the --enable-debug flag
  3. Start Qt Creator. At the start page, do: New -> Import Project -> Import Existing Project
  4. Enter bitcoin-qt as the Project Name and enter the absolute path to src/qt as Location
  5. Check over the file selection, you may need to select the forms directory (necessary if you intend to edit *.ui files)
  6. Confirm the Summary page
  7. In the Projects tab, select Manage Kits...

macOS

  • Under Kits: select the default "Desktop" kit
  • Under Compilers: select "Clang (x86 64bit in /usr/bin)"
  • Under Debuggers: select "LLDB" as debugger (you might need to set the path to your LLDB installation)

Ubuntu & Debian

Note: Some of these options may already be set

  • Under Kits: select the default "Desktop" kit
  • Under Compilers: select "GCC (x86 64bit in /usr/bin)"
  • Under Debuggers: select "GDB" as debugger
  1. While in the Projects tab, ensure that you have the bitcoin-qt executable specified under Run
  • If the executable is not specified: click "Choose...", navigate to src/qt, and select bitcoin-qt
  1. You're all set! Start developing, building, and debugging the Bitcoin Core GUI