国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Gtk Unable to load resource for composite template

這篇具有很好參考價值的文章主要介紹了Gtk Unable to load resource for composite template。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

在使用 GNOME Builder 構(gòu)建應(yīng)用時,設(shè) gnome_semilab_window 為應(yīng)用主窗口,實現(xiàn)在 gnome-semilab-window.c 中;設(shè) gsp_create_project_widget 為主窗口上的一個子組件,實現(xiàn)在 gsp-create-project-widget.c 中,插入到主窗口的 GUI 中。兩個模塊各自使用了 GtkBuilder XML UI 文件。在子組件文件中,定義子組件的類初始化函數(shù):

static void
gsp_create_project_widget_class_init (GspCreateProjectWidgetClass *klass)
{
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  gtk_widget_class_set_template_from_resource (widget_class, "gsp-create-project-widget.ui");
  gtk_widget_class_bind_template_child (widget_class, GspCreateProjectWidget, expand_button);

  gtk_widget_class_install_action (widget_class, "create-project.expand", NULL, expand_action);
}

報錯:

(gnome-semilab:2): Gtk-CRITICAL **: 18:00:38.011: Unable to load resource for composite template for type ‘GspCreateProjectWidget’: The resource at “gsp-create-project-widget.ui” does not exist

(gnome-semilab:2): Gtk-CRITICAL **: 18:00:38.011: gtk_widget_class_bind_template_child_full: assertion ‘widget_class->priv->template != NULL’ failed

(gnome-semilab:2): Gtk-CRITICAL **: 18:00:38.011: gtk_widget_init_template: assertion ‘template != NULL’ failed

參考 StackOverflow 唯一相關(guān)問題 Unable to load resource for composite template,沒有參考性。
經(jīng)反復(fù)學(xué)習(xí),得到錯誤原因是gtk_widget_class_set_template_from_resource()函數(shù)的resource_name參數(shù)必須為資源的絕對路徑,例如/org/gnome/libide-greeter/ide-greeter-row.ui。修改后錯誤消失。文章來源地址http://www.zghlxwxcb.cn/news/detail-526022.html

到了這里,關(guān)于Gtk Unable to load resource for composite template的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • 【Electron】Not allowed to load local resource

    【Electron】Not allowed to load local resource

    在使用 audio 標(biāo)簽播放音頻文件時,控制臺報錯 Not allowed to load local resource。 這個問題通常是由于安全策略引起的。Electron 默認(rèn)情況下禁止加載本地資源,以防止?jié)撛诘陌踩L(fēng)險。 解決這個問題的方法是在 main.js 中找到創(chuàng)建 BrowserWindow 實例的代碼,并在該實例的 webPreferences 配

    2024年02月07日
    瀏覽(22)
  • vue解決Not allowed to load local resource

    vue解決Not allowed to load local resource

    在進(jìn)行通過本地路徑進(jìn)行加載圖片的時候,突然就報了這個問題 Not allowed to load local resource 這個是由于安全性的問題,導(dǎo)致瀏覽器禁止直接訪問本地文件 那么,這邊我說一下我具體是怎么解決的吧 我的項目是用的vue的vantui框架+springboot 然后我后端給前端的數(shù)據(jù)是一個路徑,

    2023年04月20日
    瀏覽(87)
  • springboot如何訪問resource目錄下的文件,訪問不到資源處理方法:class path resource [template.xlsx] cannot be resolved to UR

    class path resource [template.xlsx] cannot be resolved to UR ClassPathResource 可以直接訪問到資源文件夾reource,但是為什么提示找不到資源呢,首先我先放出我得代碼 示例代碼 訪問不到資源處理方法: 報錯:class path resource [template.xlsx] cannot be resolved to UR 于是我檢查target文件是否存在編譯后

    2024年02月09日
    瀏覽(17)
  • Failed to load local font resource:微信小程序加載第三方字體

    Failed to load local font resource:微信小程序加載第三方字體

    將ttf轉(zhuǎn)換為base64格式:https://transfonter.org/ 步驟如下 將下載后的 stylesheet.css 里的 font-family 屬性名字改一下,然后引進(jìn)頁面里就行了,全局樣式就放app.scss,單頁面就引入單頁面 注: 好處不超包,壞處比較慢

    2024年02月15日
    瀏覽(21)
  • Failed to load resource: net::ERR_FILE_NOT_FOUND問題解決

    publicPath 是告訴 webpack 打包后的文件在瀏覽器中的訪問路徑。當(dāng)你設(shè)置 publicPath: \\\'./\\\' 時,實際上是將構(gòu)建后的資源相對于當(dāng)前路徑進(jìn)行引用。 相對路徑引用: 默認(rèn)情況下,Vue CLI 生成的項目會把所有靜態(tài)資源引用路徑設(shè)置為絕對路徑,即 /static/... 。這適用于大多數(shù)情況,尤其

    2024年02月20日
    瀏覽(25)
  • 微信小程序出現(xiàn)“[渲染層網(wǎng)絡(luò)層錯誤] Failed to load local image resource”解決方法

    微信小程序出現(xiàn)“[渲染層網(wǎng)絡(luò)層錯誤] Failed to load local image resource”解決方法

    加載image組件時,出現(xiàn)這樣的報錯 [渲染層網(wǎng)絡(luò)層錯誤] Failed to load local image resource /pages/main/%E9%A6%96%E9%A1%B51.png? ?the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error)? (env: Windows,mp,1.06.2301040; lib: 2.19.4) 查找資料時,發(fā)現(xiàn)有可能是圖片路徑出現(xiàn)問題 錯誤寫法: ??imgSrc

    2024年02月11日
    瀏覽(81)
  • Taro微信小程序報錯:Failed to load local image resource的解決方案

    場景 給taro地圖組件添加標(biāo)記的時候需要制定iconPath,然后報如下錯誤: [渲染層網(wǎng)絡(luò)層錯誤] Failed to load local image resource [渲染層錯誤] Uncaught Error: Uncaught TypeError: Cannot read property ‘x’ of undefined 找了很久,有說url格式錯誤的,有說基礎(chǔ)庫版本太高了的,基本上能找到的方法我

    2024年02月11日
    瀏覽(36)
  • Zookeeper無法啟動,報“Unable to load database on disk”

    Zookeeper無法啟動,報“Unable to load database on disk”

    轉(zhuǎn)載說明:如果您喜歡這篇文章并打算轉(zhuǎn)載它,請私信作者取得授權(quán)。感謝您喜愛本文,請文明轉(zhuǎn)載,謝謝。 問題描述: 測試環(huán)境部署zookeeper的服務(wù)器磁盤滿了,引起服務(wù)異常,將zookeeper進(jìn)程殺掉之后,重新啟動zookeeper啟動的時候顯示成功了: 但是zookeeper的進(jìn)程和端口都沒

    2024年02月03日
    瀏覽(26)
  • pyrender庫報錯解決方法:‘Unable to load OpenGL library’

    pyrender庫報錯解決方法:‘Unable to load OpenGL library’

    在 pip install pyrender 成功安裝后,調(diào)用 pyrender 庫時報錯: OSError: (‘GL: cannot open shared object file: No such file or directory’, ‘GL’, None) ImportError: (‘Unable to load OpenGL library’, ‘GL: cannot open shared object file: No such file or directory’, ‘GL’, None) 報錯截圖: 這種問題一般會出現(xiàn)在本機(jī)/d

    2024年01月21日
    瀏覽(110)
  • 微信小程序渲染圖片報錯:[渲染層網(wǎng)絡(luò)層錯誤] Failed to load local image resource

    微信小程序渲染圖片報錯:[渲染層網(wǎng)絡(luò)層錯誤] Failed to load local image resource

    首先這篇文章說的很對 https://blog.csdn.net/toHero/article/details/119984305 其次我所遇到的情況是渲染路徑中存在反斜杠,由于微信小程序使用ipv6協(xié)議無法矯正解析而瀏覽器(ipv4)可以 所以應(yīng)該將渲染的路徑作修改編輯

    2024年02月03日
    瀏覽(20)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包