[solved] directory tree and file list Beginners question
-
wrote on 30 Aug 2012, 21:27 last edited by
Solved showing drives in MAC, since folder volumes is hidden, I used QDir::Hidden.
Although this is not the proper way but it is a bug in QT "Reported here":https://bugreports.qt-project.org/browse/QTBUG-6875@
dirmodel->setFilter(QDir::Dirs | QDir::Drives | QDir::Hidden | QDir::NoDotAndDotDot | QDir::AllDirs);
@ -
wrote on 1 Sept 2012, 09:47 last edited by
I have another question, I created a QDialog on the fly as this, then I want to differentiate between being closed normally with the (x) button or being closed through the ok button.
@
QDialog *modifypsswdwin = new QDialog (this);
QLabel *newpsd1 = new QLabel(this); newpsd1->setText("New password");
QPushButton *modifypsswdwin_ok = new QPushButton(this); modifypsswdwin_ok->setText("OK");
connect(modifypsswdwin_ok,SIGNAL(clicked()),modifypsswdwin,SLOT(close()));
int ret=modifypsswdwin.exec();
@I searched and found that I need to do
@
QDialog.setResult(1)
@but the question is how to setthe result if i have only 1 line in the connect. Is it possible to write multiple commands in the slot(close)?
thank you
-
wrote on 1 Sept 2012, 10:53 last edited by
I found it, we should connect accept to the button as well
connect(modifypsswdwin_ok,SIGNAL(clicked()),modifypsswdwin,SLOT(accept())); connect(modifypsswdwin_ok,SIGNAL(clicked()),modifypsswdwin,SLOT(close()));
-
wrote on 3 Sept 2012, 02:06 last edited by
I have a problem with the stylesheet. I use a style sheet file. I want to set a style sheet for this browse class from the file and not hardcoded. It works when it is hardcorded in the program but i don't know how to call it in the file. I tried #Browse and tried QDialogBox#Browse but did not work.
Any idea?
21/24