Active Topics

 


Reply
Thread Tools
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#1
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:

Code:
dir->setFilter(QDir::AllDirs | QDir::NoDotAndDotDot);
dir->setSorting(QDir::Name);
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#2
Originally Posted by ahmadka View Post
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 ?
I don't know how you are creating the dialog, but you can set the height in you UI file if you are using designer, or with setFixedHeight.

Originally Posted by ahmadka View Post
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 ?
The directories are hidden directories in the MyDocs folder, like .images, .documents etc. AFAIK this is done because of the localization, so that the directories stay the same and you just map the name. The name, which is used for the folder is the bluetooth name of the device. Will try to figure out, how to get them with Qt.

Daniel
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:02.