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) qt.NewQApplication(os.Args)
btn := qt.NewQPushButton2("Hello world!") btn := qt.NewQPushButton3("Hello world!")
btn.SetFixedWidth(320) btn.SetFixedWidth(320)
var counter int = 0 var counter int = 0

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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