Need help learning therecipe/qt

Hi. I’m trying to learn how to use Qt in Go. I am working my way through a book that uses C++ examples that I’m trying to translate into Go. I’m stuck at QKeySequences.

Will someone point me in the right direction? My computer runs ubuntu 18.04.


For the record: You use

Can you show us a small sample of the code that you are having problems with?

setWindowTitle(“SRM System”);
setFixedSize(500, 500);
QPixmap newIcon(“new.png”);
QPixmap openIcon(“open.png”);
QPixmap closeIcon(“close.png”);
// Setup File Menu
fileMenu = menuBar()->addMenu("&File");
quitAction = new QAction(closeIcon, “Quit”, this);
newAction = new QAction(newIcon, “&New”, this);
newAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_C));
openAction = new QAction(openIcon, “&New”, this);
openAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_O));
helpMenu = menuBar()->addMenu(“Help”);
aboutAction = new QAction(“About”, this);
aboutAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H));
// Setup Signals and Slots
connect(quitAction, &QAction::triggered, this, &QApplication::quit);

There are four usages of QKeySequence in this C++ code.

How do you port it to Go? Does it work?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.