我希望在没有错误且没有警告的情况下自动关闭编译缓冲区,但是我想在有警告时显示它.有人可以帮帮我吗?来自emacswiki的此代码仅执行第一个要求.怎么改呢?
;; Helper for compilation. Close the compilation window if
;; there was no error at all.
(defun compilation-exit-autoclose (status code msg)
;; If M-x compile exists with a 0
(when (and (eq status 'exit) (zerop code))
;; then bury the *compilation* buffer, so that C-x b doesn't go there
(bury-buffer)
;; and delete the *compilation* window
(delete-window (get-buffer-window (get-buffer "*compilation*"))))
;; Always return the anticipated result of compilation-exit-message-function
(cons msg code))
;; Specify my function (maybe I …Run Code Online (Sandbox Code Playgroud) 我有follwing代码,其中moreButton一个QPushButton.当我切换按钮时,没有任何反应.
难道不应该显示或隐藏secondaryGroupBox和tertiaryGroupBox?
QObject::connect(moreButton, SIGNAL(toggled(bool)), secondaryGroupBox, SLOT(setVisible(bool)));
QObject::connect(moreButton, SIGNAL(toggled(bool)), tertiaryGroupBox, SLOT(setVisible(bool)));
Run Code Online (Sandbox Code Playgroud)