panic: assignment to entry in nil map
-
wrote on 15 Mar 2023, 10:23 last edited by
qtmoc /Users/chenxiao.zhao/qt_workspace/qt_test/mainwindow.ui
panic: assignment to entry in nil mapgoroutine 1 [running]:
github.com/therecipe/qt/internal/cmd.BuildEnv(0x7ff7bfeffb26, 0x37, 0x0, 0x0, 0x0, 0x0, 0x400, 0x20300000000000, 0x380, 0x400, ...)
/Users/chenxiao.zhao/go_workspace/src/pkg/mod/github.com/therecipe/qt@v0.0.0-20200904063919-c0c124a5770d/internal/cmd/cmd.go:982 +0x10e1
github.com/therecipe/qt/internal/cmd/moc.moc(0xc00001a064, 0x29, 0x7ff7bfeffb26, 0x37, 0x0, 0x0, 0x1010000, 0xffffffffffffffff, 0xc0000dbb00)
/Users/chenxiao.zhao/go_workspace/src/pkg/mod/github.com/therecipe/qt@v0.0.0-20200904063919-c0c124a5770d/internal/cmd/moc/moc.go:97 +0x52f5
github.com/therecipe/qt/internal/cmd/moc.Moc(0xc00001a064, 0x29, 0x7ff7bfeffb26, 0x37, 0x0, 0x0, 0xc000000000)
/Users/chenxiao.zhao/go_workspace/src/pkg/mod/github.com/therecipe/qt@v0.0.0-20200904063919-c0c124a5770d/internal/cmd/moc/moc.go:75 +0xe4
main.main()
/Users/chenxiao.zhao/go_workspace/src/pkg/mod/github.com/therecipe/qt@v0.0.0-20200904063919-c0c124a5770d/cmd/qtmoc/main.go:116 +0x659 -
qtmoc /Users/chenxiao.zhao/qt_workspace/qt_test/mainwindow.ui
panic: assignment to entry in nil mapgoroutine 1 [running]:
github.com/therecipe/qt/internal/cmd.BuildEnv(0x7ff7bfeffb26, 0x37, 0x0, 0x0, 0x0, 0x0, 0x400, 0x20300000000000, 0x380, 0x400, ...)
/Users/chenxiao.zhao/go_workspace/src/pkg/mod/github.com/therecipe/qt@v0.0.0-20200904063919-c0c124a5770d/internal/cmd/cmd.go:982 +0x10e1
github.com/therecipe/qt/internal/cmd/moc.moc(0xc00001a064, 0x29, 0x7ff7bfeffb26, 0x37, 0x0, 0x0, 0x1010000, 0xffffffffffffffff, 0xc0000dbb00)
/Users/chenxiao.zhao/go_workspace/src/pkg/mod/github.com/therecipe/qt@v0.0.0-20200904063919-c0c124a5770d/internal/cmd/moc/moc.go:97 +0x52f5
github.com/therecipe/qt/internal/cmd/moc.Moc(0xc00001a064, 0x29, 0x7ff7bfeffb26, 0x37, 0x0, 0x0, 0xc000000000)
/Users/chenxiao.zhao/go_workspace/src/pkg/mod/github.com/therecipe/qt@v0.0.0-20200904063919-c0c124a5770d/internal/cmd/moc/moc.go:75 +0xe4
main.main()
/Users/chenxiao.zhao/go_workspace/src/pkg/mod/github.com/therecipe/qt@v0.0.0-20200904063919-c0c124a5770d/cmd/qtmoc/main.go:116 +0x659wrote on 15 Mar 2023, 14:58 last edited by JonB@chenxiao-zhao Might depend on what is in the
.ui
file. -
wrote on 16 Mar 2023, 02:09 last edited by
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>658</width>
<height>812</height>
</rect>
</property>
<property name="windowTitle">
<string>计算器</string>
</property>
<property name="styleSheet">
<string notr="true">background-color: #2D2926;</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QTextBrowser" name="result_text_browser">
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>611</width>
<height>121</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:0;</string>
</property>
</widget>
<widget class="QPushButton" name="ac_button">
<property name="geometry">
<rect>
<x>20</x>
<y>150</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
font: 40pt ;
border-radius:50px;
background-color:#C0C0C0;</string>
</property>
<property name="text">
<string>AC</string>
</property>
</widget>
<widget class="QPushButton" name="negate_button">
<property name="geometry">
<rect>
<x>170</x>
<y>150</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
font: 40pt ;
background-color:#C0C0C0;</string>
</property>
<property name="text">
<string>+/-</string>
</property>
</widget>
<widget class="QPushButton" name="percentage_button">
<property name="geometry">
<rect>
<x>330</x>
<y>150</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
font: 40pt ;
background-color:#C0C0C0;</string>
</property>
<property name="text">
<string>%</string>
</property>
</widget>
<widget class="QPushButton" name="divide_tutton">
<property name="geometry">
<rect>
<x>500</x>
<y>150</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#FFA500;
font: 40pt ;</string>
</property>
<property name="text">
<string>÷</string>
</property>
</widget>
<widget class="QPushButton" name="eight_button_8">
<property name="geometry">
<rect>
<x>170</x>
<y>280</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#808080;
font: 35pt ;</string>
</property>
<property name="text">
<string>8</string>
</property>
</widget>
<widget class="QPushButton" name="x_button">
<property name="geometry">
<rect>
<x>500</x>
<y>280</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #FFA500;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#FFA500;
font: 40pt ;</string>
</property>
<property name="text">
<string>X</string>
</property>
</widget>
<widget class="QPushButton" name="seven_button_7">
<property name="geometry">
<rect>
<x>20</x>
<y>280</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#808080;
font: 35pt ;</string>
</property>
<property name="text">
<string>7</string>
</property>
</widget>
<widget class="QPushButton" name="nine_button_9">
<property name="geometry">
<rect>
<x>330</x>
<y>280</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#808080;
font: 35pt ;</string>
</property>
<property name="text">
<string>9</string>
</property>
</widget>
<widget class="QPushButton" name="five_button_5">
<property name="geometry">
<rect>
<x>170</x>
<y>410</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#808080;
font: 35pt ;</string>
</property>
<property name="text">
<string>5</string>
</property>
</widget>
<widget class="QPushButton" name="sub_button">
<property name="geometry">
<rect>
<x>500</x>
<y>410</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#FFA500;
font: 40pt ;</string>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
<widget class="QPushButton" name="four_button_4">
<property name="geometry">
<rect>
<x>20</x>
<y>410</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#808080;
font: 35pt ;</string>
</property>
<property name="text">
<string>4</string>
</property>
</widget>
<widget class="QPushButton" name="six_button_6">
<property name="geometry">
<rect>
<x>330</x>
<y>410</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#808080;
font: 35pt ;</string>
</property>
<property name="text">
<string>6</string>
</property>
</widget>
<widget class="QPushButton" name="two_button_2">
<property name="geometry">
<rect>
<x>170</x>
<y>540</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#808080;
font: 35pt ;</string>
</property>
<property name="text">
<string>2</string>
</property>
</widget>
<widget class="QPushButton" name="add_button">
<property name="geometry">
<rect>
<x>500</x>
<y>540</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#FFA500;
font: 40pt ;</string>
</property>
<property name="text">
<string>+</string>
</property>
</widget>
<widget class="QPushButton" name="one_button_1">
<property name="geometry">
<rect>
<x>20</x>
<y>540</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#808080;
font: 35pt ;</string>
</property>
<property name="text">
<string>1</string>
</property>
</widget>
<widget class="QPushButton" name="three_button_3">
<property name="geometry">
<rect>
<x>330</x>
<y>540</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#808080;
font: 35pt ;</string>
</property>
<property name="text">
<string>3</string>
</property>
</widget>
<widget class="QPushButton" name="equal_button">
<property name="geometry">
<rect>
<x>500</x>
<y>660</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#FFA500;
font: 40pt ;</string>
</property>
<property name="text">
<string>=</string>
</property>
</widget>
<widget class="QPushButton" name="zero_button_0">
<property name="geometry">
<rect>
<x>20</x>
<y>660</y>
<width>241</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#808080;
font: 35pt ;</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
<widget class="QPushButton" name="point_button">
<property name="geometry">
<rect>
<x>330</x>
<y>660</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border:2px solid #808080;
font: 13pt ;
color: rgb(169, 169, 169);
border-radius:50px;
background-color:#808080;
font: 35pt,Bold ;</string>
</property>
<property name="text">
<string>.</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>658</width>
<height>24</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>
1/3