Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. panic: assignment to entry in nil map

panic: assignment to entry in nil map

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 259 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chenxiao.zhao
    wrote on 15 Mar 2023, 10:23 last edited by
    #1

    qtmoc /Users/chenxiao.zhao/qt_workspace/qt_test/mainwindow.ui
    panic: assignment to entry in nil map

    goroutine 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

    J 1 Reply Last reply 15 Mar 2023, 14:58
    0
    • C chenxiao.zhao
      15 Mar 2023, 10:23

      qtmoc /Users/chenxiao.zhao/qt_workspace/qt_test/mainwindow.ui
      panic: assignment to entry in nil map

      goroutine 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

      J Offline
      J Offline
      JonB
      wrote on 15 Mar 2023, 14:58 last edited by JonB
      #2

      @chenxiao-zhao Might depend on what is in the .ui file.

      1 Reply Last reply
      1
      • C Offline
        C Offline
        chenxiao.zhao
        wrote on 16 Mar 2023, 02:09 last edited by
        #3

        <?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 Reply Last reply
        0

        1/3

        15 Mar 2023, 10:23

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved