mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Add RDTreeWidgetItem overload that constructs from QVariantList
This commit is contained in:
@@ -228,6 +228,14 @@ private:
|
||||
RDTreeWidget *widget;
|
||||
};
|
||||
|
||||
RDTreeWidgetItem::RDTreeWidgetItem(const QVariantList &values)
|
||||
{
|
||||
m_text.reserve(values.size());
|
||||
for(const QVariant &v : values)
|
||||
m_text.push_back(v);
|
||||
m_icons.resize(m_text.size());
|
||||
}
|
||||
|
||||
RDTreeWidgetItem::RDTreeWidgetItem(const std::initializer_list<QVariant> &values)
|
||||
{
|
||||
m_text = values;
|
||||
|
||||
@@ -33,6 +33,7 @@ class RDTreeWidgetItem
|
||||
{
|
||||
public:
|
||||
RDTreeWidgetItem() = default;
|
||||
RDTreeWidgetItem(const QVariantList &values);
|
||||
RDTreeWidgetItem(const std::initializer_list<QVariant> &values);
|
||||
~RDTreeWidgetItem();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user