Skip to content

Instantly share code, notes, and snippets.

@ralt
Created February 24, 2015 22:04
Show Gist options
  • Save ralt/d5ea0d019ab6ef631482 to your computer and use it in GitHub Desktop.
Save ralt/d5ea0d019ab6ef631482 to your computer and use it in GitHub Desktop.
(in-package #:aeon)
(named-readtables:in-readtable :qtools)
(define-widget aeon (QWidget) ())
(define-widget first-box (QHBoxLayout) ())
(define-widget start-button (QPushButton) ())
(define-subwidget (first-box start-button) (make-instance 'start-button))
(define-subwidget (aeon first-box) (make-instance 'first-box)
(q+:add-widget first-box start-button))
(define-subwidget (aeon layout) (q+:make-qvboxlayout aeon)
(setf (q+:window-title aeon) "Aeon")
(q+:add-widget layout first-box))
(defun main ()
(with-main-window (window (make-instance 'aeon))))
@Shinmera
Copy link

(in-package #:aeon)
(named-readtables:in-readtable :qtools)

(define-widget aeon (QWidget) ())

(define-subwidget (aeon start-button) (q+:make-qpushbutton))

(define-subwidget (aeon layout) (q+:make-qvboxlayout aeon)
  (setf (q+:window-title aeon) "Aeon")
  (let ((inner (q+:make-qhboxlayout)))
    (q+:add-widget inner start-button)
    (q+:add-layout layout inner)))

(defun main ()
  (with-main-window (window (make-instance 'aeon))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment