Sorry, me again
Is it possible to get ALL selected items in a List Widget where I have set the "Selection Mode" to "Multi-Selection" in Qt Designer?
I suppose I should also ask the same question regarding Tables and Trees?
Thanks
Shando
I printed out a copy of all Skyline Functions (using the Lua Global Table), and noticed that "qt.setFocus" comes through as "qt.setFocues"??
qt.setSelectionMode(editorName, objectName, mode (int))
-- | and the
selectionMode = getSelectionMode(editorName, objectName);
qt.getAllTreeIDs(editorName, objectName);
numRows = qt.getNumTableRows(editorName, objectName);
numColumns = qt.getNumTableColumns(editorName, objectName);
function getTreeSelectedItems() -- | This is a pushButton to trigger the ID Grab
value = qt.getSelectedItems(thisEditor, "treeWidgetExample");
if(type(value) == "table")then
lprint("Successfully got data back");
for i, v in ipairs(value) do
lprint("#&255,255,255:selected ID: "..i);
lprint("#&200,200,255: v: "..v);
end
else
lprint("Failed to grab selected ids from the tree widget");
end
end
function getListSelectedItems()
value = qt.getSelectedItems(thisEditor, "listWidgetExample");
if(type(value) == "table")then
--lprint("Successfully got data back");
for i, v in ipairs(value) do
lprint("#&255,255,255:selected ID: "..i);
lprint("#&200,200,255: v: "..v);
end
else
--lprint("Failed to grab selected ids from the tree widget");
end
end
function getTableSelectedItems()
value = qt.getSelectedItems(thisEditor, "tableWidgetExample");
if(type(value) == "table")then
--lprint("Successfully got data back");
for i, v in ipairs(value) do
rowIndex = v[0];
columnIndex = v[1];
lprint("#&255,255,255:selected ID: "..i);
lprint("#&200,200,255: rowIndex: "..rowIndex);
lprint("#&200,200,255: columnIndex: "..columnIndex);
end
else
lprint("Failed to grab selected ids from the tree widget");
end
end
-- | 1 = selected, 0 = not selected
qt.setTreeSelectedItem(editorName, objectName, id, selected (int));
isSelected = qt.getTreeSelectedItem(editorName, objectName, id);
qt.setListSelectedItem(editorName, objectName, id, selected (int));
isSelected = qt.getListSelectedItem(editorName, objectName, id);
qt.setTableSelectedItem(editorName, objectName, row, column, selected (int));
isSelected = qt.getTableSelectedItem(editorName, objectName, row, column);
qt.deselectAllItems(editorName, objectName);
Users browsing this forum: No registered users and 1 guest