Results 1 to 2 of 2

Thread: [Qt] Two questions regarding my newly made directory browsing dialog ..

  1. #1
    Join Date
    Jun 2010
    Posts
    26
    Qt products
    Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default [Qt] Two questions regarding my newly made directory browsing dialog ..

    OK so I've just finished making a custom directory browsing dialog, and I had two questions about its customization .. But first, here are some pictures ..

    Here's what I was trying to achieve (taken from Xournal):





    And here's my copy :P ..



    I have two questions regarding my copy here:

    1) First question is, how can I make my QDialog take more of the screen ? I mean as it is right now, its taking about 60% of the screen, but still the list area is not tall enough .. How can I make the QDialog fill more of the screen ?

    2) Second question is, I'm using QDir to help me browse through the directories, but there are some folders which are shown in the Xournal control, but which QDir doesn't give me .. For example, In the first two pictures, there are folders with special icons named 'Documents' and 'Audio Clips' .. these folders dont show up when I browse the same path through QDir .. There are about 4 or 5 of these folders .. Also, the directory shown in the first two Xournal pictures is /home/user/MyDocs/ .. however, in Xournal they are listed as 'Ahmad's N900' .. I must have set this name somewhere, but still, why are there these differences between the two models, and how can I make changed to my directory structure so that these differences are ironed out ?

    I'm using the following filters/options for my QDir:

    Qt Code:
    1. dir->setFilter(QDir::AllDirs | QDir::NoDotAndDotDot);
    2. dir->setSorting(QDir::Name);
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: [Qt] Two questions regarding my newly made directory browsing dialog ..

    1. you can use setFixedSize(), showMaximised(), or better connect the signal qApp->desktop()->resized() or something to your dialog's slot and setFixedsize() according to the screen size, this will also help to resize the dialog when the screen rotates.

    2. I dont know why QDir is not showing those dirs, are you sure that audio clips is physically present on the same path, are they just quick links to other places just like we have desktop, my computer etc links in open dialog on windows? . Try QFileSystemModel

Similar Threads

  1. Getting informed about newly connected network adapters
    By RThaden in forum Qt Programming
    Replies: 2
    Last Post: 19th January 2010, 15:51
  2. Hi - scouse programmer newly converted to Qt
    By NicciSixx in forum General Discussion
    Replies: 0
    Last Post: 19th January 2010, 11:05
  3. QFileDialog - remote browsing possible?
    By KShots in forum Qt Programming
    Replies: 5
    Last Post: 14th November 2009, 12:27
  4. browsing application
    By nitriles in forum Qt Programming
    Replies: 17
    Last Post: 2nd July 2008, 21:25
  5. Replies: 4
    Last Post: 13th June 2007, 15:37

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
  •  
Qt is a trademark of The Qt Company.