mirror of
https://github.com/pyapp-kit/superqt.git
synced 2025-07-21 12:11:07 +02:00
* feat: add colormap combobox * working on styles * add comment * style: [pre-commit.ci] auto fixes [...] * progress on combo * style: [pre-commit.ci] auto fixes [...] * decent styles * move stuff around * adding tests * add numpy for tests * add cmap to tests * fix type * fix for pyqt * remove topointf * better lineedit styles * better add colormap * increate linux atol * cast to int * more tests * tests * try fix * try fix test * again * skip pyside * test import * fix lineedit * add checkerboard for transparency --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
20 lines
502 B
Python
20 lines
502 B
Python
from qtpy.QtWidgets import QApplication, QVBoxLayout, QWidget
|
|
|
|
from superqt.cmap import CmapCatalogComboBox, QColormapComboBox
|
|
|
|
app = QApplication([])
|
|
|
|
wdg = QWidget()
|
|
layout = QVBoxLayout(wdg)
|
|
|
|
catalog_combo = CmapCatalogComboBox(interpolation="linear")
|
|
|
|
selected_cmap_combo = QColormapComboBox(allow_user_colormaps=True)
|
|
selected_cmap_combo.addColormaps(["viridis", "plasma", "magma", "inferno", "turbo"])
|
|
|
|
layout.addWidget(catalog_combo)
|
|
layout.addWidget(selected_cmap_combo)
|
|
|
|
wdg.show()
|
|
app.exec()
|