Dear all,Do you have suggestions on how to achieve something like the attached image within a class derived from QTreeWidget?
I'd just like to have a "Click here" adorned text centered in the widget.My guess was creating a "fake" QTreeWidgetItem and add custom stylesheet, but apparently these lines won't do the trick:
// Click here to open a project false root
QTreeWidgetItem *clickHere = new QTreeWidgetItem(this,
QStringList(QString(tr("Click to open a project..."))), idUnkown);
clickHere->setFlags(clickHere->flags() & (~Qt::ItemIsEditable) &
(~Qt::ItemIsDropEnabled));
addTopLevelItem(clickHere);
// Save stylesheet and create a new one
sheet_ = styleSheet();
setStyleSheet("QToolButton { margin-left: auto; margin-right: auto;
}");
Any hints? Thanks!
<<attachment: treewidget.jpg>>
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
