#include <QApplication>
#include <Q3ListView>
#include <Qt3Support>
class A : public Q3ListViewItem {
public:
A
(Q3ListView
*parent,
const QString &label1
) : Q3ListViewItem
(parent, label1
) {} void paintBranches
(QPainter *p,
const QColorGroup
&cg,
int w,
int y,
int h
) { Q3ListViewItem::paintBranches(p, cg, w-7, y, h);
}
};
int main( int argc, char* argv[] )
{
Q3ListView w;
w.setRootIsDecorated( true );
w.addColumn( "col1" );
w.show();
A* item1 = new A( &w, "item1" );
Q3ListViewItem* item2 = new Q3ListViewItem( item1, "item2" );
Q3ListViewItem* item3 = new Q3ListViewItem( item2, "item3" );
QObject::connect( qApp,
SIGNAL( lastWindowClosed
() ),
qApp,
SLOT( quit
() ) );
return app.exec();
}
#include <QApplication>
#include <Q3ListView>
#include <Qt3Support>
class A : public Q3ListViewItem {
public:
A(Q3ListView *parent, const QString &label1) : Q3ListViewItem(parent, label1) {}
void paintBranches(QPainter *p, const QColorGroup &cg, int w, int y, int h) {
Q3ListViewItem::paintBranches(p, cg, w-7, y, h);
}
};
int main( int argc, char* argv[] )
{
QApplication app( argc, argv );
Q3ListView w;
w.setRootIsDecorated( true );
w.addColumn( "col1" );
w.show();
A* item1 = new A( &w, "item1" );
Q3ListViewItem* item2 = new Q3ListViewItem( item1, "item2" );
Q3ListViewItem* item3 = new Q3ListViewItem( item2, "item3" );
QObject::connect( qApp, SIGNAL( lastWindowClosed() ), qApp, SLOT( quit() ) );
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks