examples: rebuild for changed constructor overloads

This commit is contained in:
mappu 2024-10-26 14:18:41 +13:00
parent 6ffd9457c5
commit 9b2270cc54
8 changed files with 18 additions and 18 deletions

View File

@ -11,7 +11,7 @@ func myRealMainFunc() {
qt.NewQApplication(os.Args)
btn := qt.NewQPushButton2("Hello world!")
btn := qt.NewQPushButton3("Hello world!")
btn.SetFixedWidth(320)
var counter int = 0

View File

@ -11,7 +11,7 @@ func main() {
qt.NewQApplication(os.Args)
btn := qt.NewQPushButton2("Hello world!")
btn := qt.NewQPushButton3("Hello world!")
btn.SetFixedWidth(320)
var counter int = 0

View File

@ -13,7 +13,7 @@ func main() {
qt.NewQApplication(os.Args)
area := scintillaedit.NewScintillaEdit()
area := scintillaedit.NewScintillaEdit2()
area.SetFixedSize2(640, 480)
area.Show()

View File

@ -11,12 +11,12 @@ func main() {
qt.NewQApplication(os.Args)
btn := qt.NewQPushButton2("QPrintSupport sample")
btn := qt.NewQPushButton3("QPrintSupport sample")
btn.SetFixedWidth(320)
btn.OnPressed(func() {
dlg := qprintsupport.NewQPrintDialog2()
dlg := qprintsupport.NewQPrintDialog3()
dlg.OnFinished(func(int) {
dlg.DeleteLater()
})

View File

@ -11,7 +11,7 @@ func main() {
qt.NewQApplication(os.Args)
btn := qt.NewQPushButton2("Hello world!")
btn := qt.NewQPushButton3("Hello world!")
btn.SetFixedWidth(320)
var counter int = 0

View File

@ -11,7 +11,7 @@ func main() {
qt.NewQApplication(os.Args)
area := qscintilla.NewQsciScintilla()
area := qscintilla.NewQsciScintilla2()
area.SetFixedSize2(640, 480)
area.Show()

View File

@ -12,7 +12,7 @@ func testMarshalling(t *testing.T) {
// Bool
t.Run("Bool", func(t *testing.T) {
b := qt.NewQCheckBox()
b := qt.NewQCheckBox2()
expect := true
b.SetChecked(expect)
@ -37,7 +37,7 @@ func testMarshalling(t *testing.T) {
// QString
t.Run("QString", func(t *testing.T) {
w := qt.NewQWidget()
w := qt.NewQWidget2()
expect := "Sample text"
w.SetToolTip(expect)
@ -60,7 +60,7 @@ func testMarshalling(t *testing.T) {
// QStringList
t.Run("QStringList", func(t *testing.T) {
c := qt.NewQInputDialog()
c := qt.NewQInputDialog2()
expect := []string{"foo", "bar", "baz", "quux"}
c.SetComboBoxItems(expect)

View File

@ -34,19 +34,19 @@ type AppTab struct {
func NewAppTab() *AppTab {
var ret AppTab
tab := qt.NewQWidget()
tab := qt.NewQWidget2()
ret.tab = tab
layout := qt.NewQHBoxLayout2(tab)
layout := qt.NewQHBoxLayout(tab)
panes := qt.NewQSplitter()
panes := qt.NewQSplitter2()
layout.AddWidget(panes.QWidget)
ret.outline = qt.NewQListWidget2(tab)
ret.outline = qt.NewQListWidget(tab)
panes.AddWidget(ret.outline.QWidget)
ret.outline.OnCurrentItemChanged(ret.handleJumpToBookmark)
ret.textArea = qt.NewQTextEdit3(tab)
ret.textArea = qt.NewQTextEdit(tab)
ret.textArea.OnTextChanged(ret.handleTextChanged)
panes.AddWidget(ret.textArea.QWidget)
@ -60,12 +60,12 @@ func NewAppWindow() *AppWindow {
ret := AppWindow{}
ret.w = qt.NewQMainWindow()
ret.w = qt.NewQMainWindow2()
ret.w.SetWindowTitle("Markdown Outliner")
// Menu
mnu := qt.NewQMenuBar()
mnu := qt.NewQMenuBar2()
fileMenu := mnu.AddMenuWithTitle("&File")
newtab := fileMenu.AddAction("New Tab")
@ -98,7 +98,7 @@ func NewAppWindow() *AppWindow {
// Main widgets
ret.tabs = qt.NewQTabWidget2(ret.w.QWidget)
ret.tabs = qt.NewQTabWidget(ret.w.QWidget)
ret.tabs.SetTabsClosable(true)
ret.tabs.OnTabCloseRequested(func(index int) {
ret.handleTabClose(index)