Skip to content

Panic "can only override virtual methods for directly constructed types" when calling a parent class override method #246

@marc-a-didier

Description

@marc-a-didier

Hi, currently giving a try to miqt to port legacy gtk2 code to qt6 on ubuntu 22.04. Everything goes well, it compiles and get executables. But as soon as I try to do something less trivial than the miqt provided examples, I run into problems. Simple example: I built examples/modelview_color6, it runs ok. Then I changed the code from

	model.OnRowCount(func(parent *qt.QModelIndex) int {
		return 1000
	})

to

	model.OnColumnCount(func(parent *qt.QModelIndex) int {
		return 2
	})
	model.OnRowCount(func(parent *qt.QModelIndex) int {
		return 1000
	})

Just added a method to have more columns and all what I get is:

panic: miqt: can only override virtual methods for directly constructed types

Can someone explain me where the problem lies?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtroubleshootingInvestigating an issue to determine its status

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions