kde

How to access to parent widget on qt?

半世苍凉 提交于 2019-12-01 04:40:22
问题 I have an inherited QTreeWidget (called PackList) class and its parent is a KXmlGuiWindow. How can I access to the parent's slots? I've tried getParent()->mySlot() from the QTreeWidget class but I've got error: no matching function for call to 'PackList::mySlot()' Does anybody know the correct way? Thanks 回答1: If you know the parent's class, you will have to cast parentWidget() to that class and then call your slot. Keep in mind whether or not it's a slot makes no difference in this case. You

bash及其特性

风格不统一 提交于 2019-11-30 18:04:36
shell是离用户最近的一个程序,也是用户直接链入计算机的外壳,shell分为GUI、CLI两种,CUI里面有gnome、KDE、Xfce,CLI里面有sh、bash、csh、ksh、zsh、tcsh。这次我们讲bash,讲之前得先弄清楚进程与程序的关系,在每个进程看来,当前主机上只存在内核和当前进程,进程是程序的副本,进程是程序执行实例。当执行bash进程,在bash里在执行一个bash进程,子bash所拥有的特性,父bash可能不可拥有,反过来也是。 bash特性 命令历史、命令补全 管道、重定向 命令别名 命令行编辑 命令行展开 文件名通配 变量 编程 命令行编辑( 光标跳转) Ctrl+a:跳到命令行首 Ctrl+e:跳到命令行尾 Crtl+d: Ctrl+u: 删除光标至命令行首的内容 Ctrl+k: 删除光标至命令行尾的内容 Ctrl+l: 清屏 ctrl+左右箭头:按单词转跳 命令历史 $ history -c:清空命令历史 -d OFFSET [n]: 删除指定位置的命令 -w:保存命令历史至历史文件中 命令默认显示1000行,可以配置环境变量,改变命令缓存的条数。可以使用echo `$HISTSIZE`查看,要修改变量可以直接修改。 命令历史的使用技巧 !n:执行命令历史中的第n条命令 !-n:执行命令历史中的倒数第n条命令 !!: 执行上一条命令 !string

Qt place new window correctly on screen, center over mouse, move into screen

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 15:03:19
After many months of trying, searching, reviewing code, etc. I'm unable to find a solution to properly positioning a new window in QT. In my most basic case I simply want to get the final size of the window and center it under the mouse. It will be shifted to ensure that no part of the window is outside of the screen. I do not wish to have the window appear then move into position, that produces visual jarring, particularly with desktop FX turned on. The problems I've encountered, not all of which have proper solutions: frameGeometry is not always populated before the window has been shown

linux/kde下chrome浏览器缺失最小化,最大化按钮的解决方案

回眸只為那壹抹淺笑 提交于 2019-11-30 01:42:27
原因 manjaro安装了kde,由于使用wine tim,所以安装了gnome-settings-daemon 重现 chrome关闭 使用系统标题栏和边框 选项, 启动/usr/lib/gsd-xsettings程序后, chrome最小化最大化按钮异常,结束进程后恢复 针对的解决办法 执行 gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close' 原文: https://www.reddit.com/r/xfce/comments/99jasm/chromium_missing_minimize_and_maximize_buttons/ 来源: https://www.cnblogs.com/zbqhc/p/11544401.html

如何在 Linux 中删除目录

人走茶凉 提交于 2019-11-29 19:14:34
有几种不同的方法可以删除 Linux 系统中的目录。如果您使用桌面文件管理器(如 Gnome 的文件管理器或 KDE 的 Dolphin) ,则可以使用管理器的图形用户界面删除文件和目录。但是,如果您正在使用无头服务器或想要一次删除多个目录,最好的选择是从 命令 行删除目录(文件夹)。 在这篇文章中,我们将介绍如何使用 rmdir , rm 和 find 命令 删除 Linux 中的目录。 在你开始之前 使用桌面文件管理器删除目录时,该目录实际上已移至“废纸篓”,并且可以轻松恢复。 从命令行删除文件或目录时要格外小心,因为一旦使用本文中介绍的命令删除目录,就无法完全恢复。 在大多数 Linux 文件系统上,删除目录需要对目录及其内容具有写权限。否则您将收到“不允许操作”错误。 必须使用反斜杠 (/) 转义其中包含空格的目录名称。 删除目录 rmdir rmdir 是一个用于删除空目录的命令行实用程序。只有当目录为空时才需要删除目录,而不需要检查目录是否为空。 要删除目录 rmdir ,请键入命令,然后键入要删除的目录的名称。例如,要删除名为 linuxmi 的目录,请键入: linuxidc@linuxidc:~$ rmdir linuxmi 如果目录不为空,您将收到以下错误: rmdir: 删除 'linuxmi' 失败: 目录非空 在这种情况下,您需要使用该 rm

How do you get the icon, MIME type, and application associated with a file in the Linux Desktop?

戏子无情 提交于 2019-11-28 05:53:10
Using C++ on the Linux desktop, what is the best way to get the icon, the document description and the application "associated" with an arbitrary file/file path? I'd like to use the most "canonical" way to find icons, mime-type/file type descriptions and associated applications on both KDE and gnome and I'd like to avoid any "shelling out" to the command line and "low-level" routines as well as avoiding re-inventing the wheel myself (no parsing the mime-types file and such). Edits and Notes: Hey, I originally asked this question about the QT file info object and the answer that "there is no

How to disable automatic mnemonics in a Qt application on KDE?

邮差的信 提交于 2019-11-27 23:58:17
In any Qt application on KDE when I add a QPushButton in designer and check it's text by: void MainWindow::on_pushButton_clicked() { qDebug()<<ui->pushButton->text(); } The output is preceded by an & : &PushButton This behavior does not exist on Windows. It seems that Qt applications on KDE automatically add shortcuts to all push buttons, which is not desired for me. I should note that the ampersands are not created by designer and you can not see them in the .ui file. Actually when the button is added to a widget, an & is placed somewhere in it's text. Is it possible to disable automatic

swt browser No more handles Error

两盒软妹~` 提交于 2019-11-27 14:50:41
问题 I wrote a simple program. just a CTabFolder and a WelcomTab inherent from CTabItem. I want to fill my WelcomeTab by a browser which render my htmls. at the init() method of WelcomeTab I Create a Browser but when program want to construct it I get this Error Exception in thread "main" org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)] at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.browser.Mozilla.initMozilla(Unknown Source) at org

Qt, Mouse skipping, not updating every pixel, mouseMoveEvent()

♀尐吖头ヾ 提交于 2019-11-27 06:20:49
问题 I working on a simple paint program. It seemed Qt (and KDE) would be a easy way to implement it. I find Qt quite easy to work with, but now I have hit a problem. When I draw something in my program the mouse skips if I move the mouse to fast. like this: It susposed to be like one long string. I'm using mouseMoveEvent() to draw a pixel to my image when the left mouse button is pressed down. I have called setMouseTracking(true); so the event should be called as long as I move the mouse. void

R - How to find points within specific Contour

南楼画角 提交于 2019-11-27 02:12:38
问题 I am creating density plots with kde2d (MASS) on lat and lon data. I would like to know which points from the original data are within a specific contour. I create 90% and 50% contours using two approaches. I want to know which points are within the 90% contour and which points are within the 50% contour. The points in the 90% contour will contain all of those within the 50% contour. The final step is to find the points within the 90% contour that are not within the 50% contour (I do not