Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. root

    Log in to post
    • All categories
    • D

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

      13
      0
      Votes
      13
      Posts
      416
      Views

      D

      @KroMignon thank you

    • pauledd

      Unsolved Deploy to remote and run in terminal (as root!)?
      General and Desktop • cross compile raspberry pi root deploy term • • pauledd

      2
      0
      Votes
      2
      Posts
      775
      Views

      pauledd

      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...

    • M

      Unsolved Bluetooth examples and permissions
      General and Desktop • bluetooth qt5.7 root • • Mark81

      1
      0
      Votes
      1
      Posts
      1255
      Views

      No one has replied

    • Punit

      Solved QTreeView shows all the subfolders, but not the parent folder.
      General and Desktop • qt 5.6 treeview qfilesystemmode directory root • • Punit

      7
      0
      Votes
      7
      Posts
      4405
      Views

      fcarney

      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.

    • H

      << OpenFileDialog works only as root >>
      General and Desktop • root openfiledialog • • Hatuey

      10
      0
      Votes
      10
      Posts
      2049
      Views

      jsulm

      "It is possible to get that kind of information from the application executable?" - it's easy.
      Call ldd PATH_TO_EXECUTABLE in a terminal

    • N

      Installed QT 5.5.0 on Fedora22: Help me set required permission
      General and Desktop • linux fedora permission root write opt • • nishu-tryinghard

      20
      0
      Votes
      20
      Posts
      4452
      Views

      SGaist

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