Results 1 to 3 of 3

Thread: QFileDialog

  1. #1
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default QFileDialog

    I am trying to subclass a QFileDialog by adding some extra buttons to it on a side of the dialog. In Qt3 there were some functions called addLeftWidget( ), addRightWidget( ), addWidget( ). But I cannot find this anywhere in the Qt4 documentation. Is there a simple way to do this in Qt without writing a whole entire File Dialog myself? Thanks!

  2. #2
    Join Date
    Nov 2007
    Posts
    51
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default Re: QFileDialog

    Greetings.

    I hope i won't lead you on a wrong trail, because i haven't tried this myself, but:

    QFileDialog almost certainly has a layout, accessible with the layout() method.
    Based on what layout it is, probably a QGridLayout, you can use one of the overloaded addWidget() methods of that particular class.

    Good luck.

  3. #3
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Smile Re: QFileDialog

    Yeah I can try that. It would just be nice if they had the convenience functions like they did in Qt3 so it doesn't matter what style of layout they use, it would be fail-safe. Now if they change the layout (though very unlikely) my code could break in a future version of Qt. But this probably is the best route I can go as of right now. Thanks for the idea!

Similar Threads

  1. QFileDialog and file sequences
    By peterhillman in forum Qt Programming
    Replies: 5
    Last Post: 24th November 2007, 10:16
  2. QFileDialog in Qt designer
    By tpf80 in forum Qt Tools
    Replies: 1
    Last Post: 17th May 2007, 00:41
  3. QFileDialog Mac / PC
    By hey in forum Qt Programming
    Replies: 3
    Last Post: 26th April 2007, 18:23
  4. Auto resolve in QFileDialog
    By Levon Nikoghosyan in forum Qt Programming
    Replies: 1
    Last Post: 29th November 2006, 11:15
  5. copy file/s from QFileDialog
    By raphaelf in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 14:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.