Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. directory
    Log in to post

    • UNSOLVED I cannot set QPixmap without passing the whole directory
      General and Desktop • qpixmap path directory directory struc file path • • FarukErat  

      2
      0
      Votes
      2
      Posts
      43
      Views

      @FarukErat said in I cannot set QPixmap without passing the whole directory: I wanna shorten tha path to ":/res/black.bmp". Then you need to put them into a resource file: https://doc.qt.io/qt-5/resources.html
    • SOLVED File not found
      QML and Qt Quick • qml file directory file not found • • texasRanger  

      5
      0
      Votes
      5
      Posts
      245
      Views

      @JonB Oh yeah sorry.. I wasn't reading the right. It was opening in a VS text editor. I tried running it with notepad and it worked. I guess VS has something where they keep the file open, so i couldn't edit it and then update the display.
    • SOLVED Project ERROR: Cannot run compiler 'clang++'
      General and Desktop • error windows 10 directory clang++ • • qwerty11111122  

      3
      1
      Votes
      3
      Posts
      1009
      Views

      @aha_1980 said in Project ERROR: Cannot run compiler 'clang++': You usually get *.pro.user.16fe832 files if you copy the project to another machine and open it there without deleting the .pro.user first. ...yes. I suppose that's a missing piece of information. The machine I developed on couldn't properly report to github, so I copied it to a flash drive.
    • SOLVED List Sub_directories from selected directory
      General and Desktop • qt creator qt5.5 subdirs directory • • Kinesis  

      16
      0
      Votes
      16
      Posts
      2819
      Views

      @jsulm got it got it . Thanks .
    • SOLVED Image viewer - moving to previous image in directory
      General and Desktop • image qstringlist directory • • Avec  

      13
      0
      Votes
      13
      Posts
      4391
      Views

      @Avec Oh duh.. I should have thought of that as a potential reason. I just assumed that you were in the directory with the files as your current dir. Glad it's all solved. :)
    • SOLVED QTreeView shows all the subfolders, but not the parent folder.
      General and Desktop • treeview qt 5.6 qfilesystemmode directory root • • Punit  

      7
      0
      Votes
      7
      Posts
      4101
      Views

      I had issues making these solutions work for the QML TreeView. I ended up setting the root path of my QFileSystemModel to the directory I wanted to view. Then I set the rootIndex in the TreeView to the parent of the index for that directory. This is of course showed its siblings. Then I did the following to filter those siblings away. I also made this optional through a property as there are times when I want that behavior: bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const { FileSystemModel* tmodel = qobject_cast<FileSystemModel*>(parent()); if(tmodel){ QModelIndex index = tmodel->index(source_row, 0, source_parent); QModelIndex rootIndex = tmodel->index(tmodel->rootPath()); if(!rootIndex.isValid() || !index.isValid()) return false; return ((index == rootIndex) || !(tmodel->filtersiblings() && isSiblingOf(index, rootIndex))); } return false; } bool isSiblingOf(const QModelIndex& index, const QModelIndex& parent) const { if(!index.isValid() || !parent.isValid()) return false; QModelIndex sibling; int row=0; do{ sibling = parent.sibling(row,0); if(sibling == index) return true; ++row; }while(sibling.isValid()); return false; } I took more of a blacklist approach versus a whitelist approach.
    • SOLVED How to read all files from a selected directory and use them one by one?
      General and Desktop • qdir directory read all files stack of images • • beginMyCoding  

      6
      0
      Votes
      6
      Posts
      64249
      Views

      did you figure out how to make this program work? if so, please provide details on it because I am trying to do the same thing with a current project.
    • SOLVED i want remove Directory
      General and Desktop • qprocess directory remove • • ForestPoem  

      7
      0
      Votes
      7
      Posts
      6753
      Views

      @Ratzz Did you use a relative path. And I've solved another way thanks
    • UNSOLVED QCustomPlot problem C1083: Cannot open include file: 'qcustomplot.h': No such file or directory
      General and Desktop • qcustomplot directory no such file or • • kybernetes  

      2
      0
      Votes
      2
      Posts
      1945
      Views

      Hi, From a quick look at the setting up page, are you including the sources of QCustomPlot in your project ?
    • [SOLVED] Qt Creator : How to list files and directories to Tree widget which placed in a stacked widget page
      Mobile and Embedded • qtcreator qtreewidget directory qt5.2.1 file navigation • • Ajith_P_V  

      4
      0
      Votes
      4
      Posts
      4934
      Views

      @SGaist Thank you once again! Now, I can manage to display the folder list inside the stacked widget page using QTreeView + QFileSystemModel combo!
    • QFileDialog but disallow changing directory?
      General and Desktop • qfiledialog directory filters • • pmh4514  

      1
      0
      Votes
      1
      Posts
      472
      Views

      No one has replied