Navigation

    Qt Forum

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

    • UNSOLVED Creating json file with subroot
      General and Desktop • qt5 json root • • deleted286  

      13
      0
      Votes
      13
      Posts
      276
      Views

      @KroMignon thank you
    • UNSOLVED Deploy to remote and run in terminal (as root!)?
      General and Desktop • cross compile raspberry pi deploy root term • • pauledd  

      2
      0
      Votes
      2
      Posts
      529
      Views

      I somehow workaround it. On the RaspberryPi I created a bash script in /usr/bin: /usr/bin/x5 #!/bin/bash xhost +local: sudo /home/pi/adas0002 --platform xcb I made it executable and then on my Desktop-Pc in Qt-Creator I have "/usr/bin/x5" in "Alternate executable on device". Now my application starts with root even without invoking any terminal. I know this is very bad in security point of view but I dont care on my little offline Raspi...
    • UNSOLVED Bluetooth examples and permissions
      General and Desktop • bluetooth qt5.7 root • • Mark81  

      1
      0
      Votes
      1
      Posts
      1148
      Views

      No one has replied

    • 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.
    • << OpenFileDialog works only as root >>
      General and Desktop • root openfiledialog • • Hatuey  

      10
      0
      Votes
      10
      Posts
      1991
      Views

      "It is possible to get that kind of information from the application executable?" - it's easy. Call ldd PATH_TO_EXECUTABLE in a terminal
    • Installed QT 5.5.0 on Fedora22: Help me set required permission
      General and Desktop • linux write root fedora permission opt • • nishu-tryinghard  

      20
      0
      Votes
      20
      Posts
      4238
      Views

      AFAIC Qt Creator assumes that examples are self contained. These are a bit of a special case