mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 08:55:06 +00:00
LibGUI: Allow specifying the model column for GListView and GComboBox
These widgets can only display a single column from the underlying data model, and it was previously hard-coded to use column 0. Now you can use any column you like.
This commit is contained in:
parent
7c0f9ea2b9
commit
ffff150435
2 changed files with 6 additions and 0 deletions
|
@ -27,6 +27,9 @@ public:
|
|||
|
||||
virtual Rect content_rect(const GModelIndex&) const override;
|
||||
|
||||
int model_column() const { return m_model_column; }
|
||||
void set_model_column(int column) { m_model_column = column; }
|
||||
|
||||
private:
|
||||
virtual void did_update_model() override;
|
||||
virtual void paint_event(GPaintEvent&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue