manucorrales
19th July 2006, 17:13
Hi, i am using a QSqlRelationalTableModel like this:
modelo->setTable("producto");
modelo->setRelation(1, QSqlRelation("rubro", "idrubro", "nombre"));
modelo->select();
now after this i want to set a filter but with the related column, in this case the column rubro.nombre from the table rubro. How can i do this? Is this possible? Ive tryed several ways but is not working at all, i ve tried "rubro = sometext" "idrubro = idrubro" and a few more. Can anybody help me?
Thanks.
modelo->setTable("producto");
modelo->setRelation(1, QSqlRelation("rubro", "idrubro", "nombre"));
modelo->select();
now after this i want to set a filter but with the related column, in this case the column rubro.nombre from the table rubro. How can i do this? Is this possible? Ive tryed several ways but is not working at all, i ve tried "rubro = sometext" "idrubro = idrubro" and a few more. Can anybody help me?
Thanks.