Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved] directory tree and file list Beginners question
Forum Updated to NodeBB v4.3 + New Features

[solved] directory tree and file list Beginners question

Scheduled Pinned Locked Moved General and Desktop
24 Posts 2 Posters 12.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SherifOmran
    wrote on 30 Aug 2012, 21:27 last edited by
    #21

    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);
    @

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SherifOmran
      wrote on 1 Sept 2012, 09:47 last edited by
      #22

      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

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SherifOmran
        wrote on 1 Sept 2012, 10:53 last edited by
        #23

        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()));
        
        1 Reply Last reply
        0
        • S Offline
          S Offline
          SherifOmran
          wrote on 3 Sept 2012, 02:06 last edited by
          #24

          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?

          1 Reply Last reply
          0

          21/24

          30 Aug 2012, 21:27

          • Login

          • Login or register to search.
          21 out of 24
          • First post
            21/24
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved