This post has been edited 1 times, last edit by "TallMonke" (Mar 28th 2005, 3:54pm)
Quoted
Originally posted by TallMonke
I finally figured out to use the addWidgets() function of QFileDialog to add a 2 labels and a button to the bottom of the open file dialog. I first had to inherit from QFileDialog in my class, then called the addWidgets in the constructor. Not exactly what I had in mind, but it works.
This post has been edited 1 times, last edit by "chickenblood" (Mar 28th 2005, 8:16pm)
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
class FilePreview : public QVBox, public QFilePreview
{
public:
FilePreview( QWidget *parent = 0 ) : QVBox( parent ) {}
void previewUrl( const QUrl &u )
{
QLabel *fileTypeLbl;
QString path = u.path();
setCaption( "File Information:" );
new QLabel( tr( "File Type:" ), this );
fileTypeLbl = new QLabel( path, this );
}
};
|
This post has been edited 1 times, last edit by "chickenblood" (Mar 29th 2005, 8:42pm)