如何在qml文件中引用.ui.qml中的

如何在qml文件中引用.ui.qml中的,第1张

同文件夹敬码孝下模缺 只要 名字{} 就可以(.后面亮稿的不要)

不同文件夹的话 需要引入文件夹 import “.....” 然后名字{} 就可以(.后面的不要)

以 bash shell 为例, 其它 shell 基本类似, 请自行学习.

bash 版本:GNU bash, 版本 4.2.37(1)-release (x86_64-pc-linux-gnu)

bash manual 中说明了 shell 命令执行之前经历的过程:

此命令名是否含有 "/", 如果有, 执行命令, 如果无, 进行下一步.

此命令名是否为 shell 函数名, 如果是, 执行函数, 如果不是, 进行下一步.

此命令名是否为 shell 内置命令名, 如果是, 执行内置命令, 如果不是, 进行下一步.

此命令名是否为环境变量 PATH 中的路径下的可执行文件名, 如果是, 执行命令, 如果不是, 进行下一步.

当前 shell 是否存在 shell 函数 "command_not_found_handle", 如果有, 它把原命令以及参数当作自己的参数然后执行, 如果没有, shell 输出错误信息, 然后返回退出状态 127.

所以,  要执行当前目录下的程序(当前目录不在环境变量 PATH 中), 直接输入文件名是不可以的, 唯一的方法是带上 "/", 而带有 "/" 的路径表示形式有很多, 其中最简运段散单的就是 "./filename".

以下是 bash manual 中, 关于命令执行的一部分:

COMMAND EXECUTION

       After a command has been split into words, if it results in a simple command and an optional  list  of  argu‐

       ments, the following actions are taken.

       If  the  command name contains no slashes, the shell attempts to locate it.  If there exists a shell function

       by that 燃悄name, that function is invoked as described above in FUNCTIONS.  If the name does not match  a  func‐

       tion, the shell searches for it in the list of shell builtins.  If a match is found, that builtin is invoked.

       If the name is neither a shell function nor a builtin, and contains no slashes, bash searches each element of

       the PATH for a directory containing an executable file by that name.  Bash uses a hash table to remember  the

       full  pathnames  of  executable  files  (see  hash under SHELL BUILTIN COMMANDS below).  A full search of the

  旁氏     directories in PATH is performed only if the command is not found in the hash table.  If the search is unsuc‐

       cessful,  the  shell  searches for a defined shell function named command_not_found_handle.  If that function

       exists, it is invoked with the original command and the original command's arguments as  its  arguments,  and

       the  function's exit status becomes the exit status of the shell.  If that function is not defined, the shell

       prints an error message and returns an exit status of 127.

       If the search is successful, or if the command name contains one or more  slashes,  the  shell  executes  the

       named  program  in  a separate execution environment.  Argument 0 is set to the name given, and the remaining

       arguments to the command are set to the arguments given, if any.

       If this execution fails because the file is not in executable format, and the file is not a directory, it  is

       assumed  to  be a shell script, a file containing shell commands.  A subshell is spawned to execute it.  This

       subshell reinitializes itself, so that the effect is as if a new shell had been invoked to handle the script,

       with  the  exception  that  the  locations  of  commands remembered by the parent (see hash below under SHELL

       BUILTIN COMMANDS) are retained by the child.

       If the program is a file beginning with #!, the remainder of the first line specifies an interpreter for  the

       program.   The  shell  executes  the  specified interpreter on operating systems that do not handle this exe‐

       cutable format themselves.  The arguments to the interpreter consist of a single optional argument  following

       the  interpreter  name on the first line of the program, followed by the name of the program, followed by the

       command arguments, if any.

本人水平有限, 欢迎批评指正.


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/tougao/12169468.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-21
下一篇 2023-05-21

发表评论

登录后才能评论

评论列表(0条)

保存