RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / 问题

问题[qtcreator]

Martin Hope
timob256
Asked: 2022-05-21 21:26:50 +0000 UTC

错误:SDL/SDL_gamecontroller.h:没有这样的文件或目录#include <SDL/SDL_gamecontroller.h>

  • -1

收集到 Urho3D-1.8-ALPHA(一切都组装好了)

决定从Urho3D构建一个简单的示例

但由于某种原因,它写入的文件甚至不在项目中(受保护的内部),没有标题 SDL_gamecontroller.h ,虽然它不存在这样的文件在 SDL2/SDL_gamecontroller.h 但我不想修复内部系统文件

我无法理解他(cmake)是如何收集所有示例的,但我无法应付(我连接了所有库),这是本地化错误:

urno_example1.pro

#-------------------------------------------------
#
# Project created by QtCreator 2021-12-21T11:52:47
#
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = urno_example1
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0


SOURCES += \
#        main.cpp \
#        mainwindow.cpp
    HelloWorld.cpp \
    Sample.inl

HEADERS += \
#        mainwindow.h
    HelloWorld.h \
    Sample.h

INCLUDEPATH +=/home/dima/ogre/Urho3D-1.8-ALPHA/Source/ThirdParty/SDL/include \
        /home/dima/ogre/Urho3D-1.8-ALPHA/build/Source/ThirdParty/SDL/include/generated \
        /usr/local/include/Urho3D                                             \
#    /home/dima/ogre/Urho3D-1.8-ALPHA/build/include/Urho3D                    \
#    /home/dima/ogre/Urho3D-1.8-ALPHA/build/include/Urho3D/ThirdParty/SDL     \
#    /usr/include/SDL                                                         \
#    /usr/include/SDL2


unix:!macx: LIBS += -L$$PWD/../../../../usr/local/lib/Urho3D/ -lUrho3D

INCLUDEPATH += $$PWD/../../ogre/Urho3D-1.8-ALPHA/Source/Urho3D
DEPENDPATH += $$PWD/../../ogre/Urho3D-1.8-ALPHA/Source/Urho3D

unix:!macx: PRE_TARGETDEPS += $$PWD/../../../../usr/local/lib/Urho3D/libUrho3D.a

unix:!macx: LIBS += -L$$PWD/../../ogre/Urho3D-1.8-ALPHA/build/Source/ThirdParty/SDL/ -lSDL

INCLUDEPATH += $$PWD/../../ogre/Urho3D-1.8-ALPHA/Source/ThirdParty/SDL/include
DEPENDPATH += $$PWD/../../ogre/Urho3D-1.8-ALPHA/Source/ThirdParty/SDL/include

unix:!macx: PRE_TARGETDEPS += $$PWD/../../ogre/Urho3D-1.8-ALPHA/build/Source/ThirdParty/SDL/libSDL.a


# --- linux ---

unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/x86_64-linux-gnu/ -lOpenGL

INCLUDEPATH += $$PWD/../../../../usr/include/GL
DEPENDPATH += $$PWD/../../../../usr/include/GL

unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/x86_64-linux-gnu/ -lGLEW

INCLUDEPATH += $$PWD/../../../../usr/include/GL
DEPENDPATH += $$PWD/../../../../usr/include/GL

unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/x86_64-linux-gnu/ -lglut

INCLUDEPATH += $$PWD/../../../../usr/include/GL
DEPENDPATH += $$PWD/../../../../usr/include/GL

unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/x86_64-linux-gnu/ -lGLU

INCLUDEPATH += $$PWD/../../../../usr/include/GL
DEPENDPATH += $$PWD/../../../../usr/include/GL


//
// Copyright (c) 2008-2019 the Urho3D project.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

你好世界.h

    #pragma once
    #include "SDL.h"
    #include "Sample.h"
    
    /// This first example, maintaining tradition, prints a "Hello World" message.
    /// Furthermore it shows:
    ///     - Using the Sample / Application classes, which initialize the Urho3D engine and run the main loop
    ///     - Adding a Text element to the graphical user interface
    ///     - Subscribing to and handling of update events
    class HelloWorld : public Sample
    {
        URHO3D_OBJECT(HelloWorld, Sample);
    
    public:
        /// Construct.
        explicit HelloWorld(Context* context);
    
        /// Setup after engine initialization and before running the main loop.
        void Start() override;
    
    protected:
        /// Return XML patch instructions for screen joystick layout for a specific sample app, if any.
        String GetScreenJoystickPatchString() const override { return
            "<patch>"
            "    <add sel=\"/element/element[./attribute[@name='Name' and @value='Hat0']]\">"
            "        <attribute name=\"Is Visible\" value=\"false\" />"
            "    </add>"
            "</patch>";
        }
    
    private:
        /// Construct a new Text instance, containing the 'Hello World' String, and add it to the UI root element.
        void CreateText();
        /// Subscribe to application-wide logic update events.
        void SubscribeToEvents();
        /// Handle the logic update event.
        void HandleUpdate(StringHash eventType, VariantMap& eventData);
    };

/usr/local/include/Urho3D/Input/InputConstants.h:31: ошибка: SDL/SDL_gamecontroller.h: No such file or directory
 #include <SDL/SDL_gamecontroller.h>
                                    ^

жалуется на /usr/local/include/Urho3D/Input/InputConstants.h 

我将如何跳过这个挑剔的 vseravno 控制器将无法连接。


在此处输入图像描述

在此处输入图像描述

qtcreator
  • 1 个回答
  • 10 Views
Martin Hope
Anton-Vas
Asked: 2022-03-13 18:14:13 +0000 UTC

无法将 [undefined] 分配给 RadioButton 的 bool

  • 0

我在章节顶部有一些项目。窗户。其中的任务是选择操作模式,然后窗口关闭并显示章节。窗户。我还没有绑定 C++ 类,所以大多数类似的问题都没有帮助。发生错误:在第二种情况下无法将 [undefined] 分配给 bool。

发生:

1-在正确的项目中创建两个自定义单选按钮-> 全部确定;

2- 从单独的文件中调用所需项目中的两个自定义单选按钮->可见错误:parent.checked。

DarkRadioButton.qml

import QtQuick 2.14
import QtQuick.Controls 2.14

RadioButton {

    checked: false

    indicator: Rectangle {
        implicitWidth: 20
        implicitHeight: 20
        x: payloadRole.horizontalPadding
        y: payloadRole.height / 2 - height / 2
        radius: 0
        border.color: Qt.rgba( 255/255., 0/255., 0/255., 1)
        color: Qt.rgba( 32/255., 32/255., 32/255., 1)

        Rectangle {
            id: radioButtonBox
            width: 16
            height: 16
            x: 2
            y: 2
            Image {
                anchors.fill: radioButtonBox
                source: "qrc:/res/resources/DarkRadioButtonBox.png"
                fillMode: Image.PreserveAspectCrop
                sourceSize.width: 200
                sourceSize.height: 200
            }
            visible: parent.checked             //!!!!!!!!!! ошибка !!!!!!!!!!!!
        }
    }
    contentItem: Text {
        text: parent.text
        font: parent.font
        color: Qt.rgba( 255/255., 255/255., 255/255., 1)
        verticalAlignment: Text.AlignVCenter
        leftPadding: parent.indicator.width + parent.spacing
    }
    onCheckedChanged: {
        //some extern value function (not here yet)
        optionsWindow.visible = false
    }
}

通话地点:有条件的main.qml

//--- 
Item {
         //---
         ColumnLayout{
                        width:  dialog.width
                        height:  dialog.height
        
                        DarkRadioButton {
                            id: optionA
                            text: qsTr("Option 1")
                            Layout.alignment: Qt.AlignCenter
                        }
                        DarkRadioButton {
                            id: optionB
                            text: qsTr("Option 2")
                            Layout.alignment: Qt.AlignCenter
                        }

关闭项目有效,但我计划继续使用此模板。我不知道这个错误是否会干扰,所以我决定寻求帮助。

qtcreator
  • 1 个回答
  • 10 Views
Martin Hope
Anton-Vas
Asked: 2022-10-06 16:50:47 +0000 UTC

如何正确学习 QML?

  • 2

我正在学习 QML,例如我决定反汇编一个开源应用程序。问题是有超过一百个 .qml 文件......

是否有任何应用程序可以在文件之间以例如图形的形式进行继承?或者你将不得不用手一个接一个地检查文件,在一张纸上写下研究结果。

我了解 QML 的概念,但我想创建这些文件的映射。该程序是用QtCreator编写的,也许它有类似的功能?

qtcreator
  • 1 个回答
  • 10 Views
Martin Hope
Сергей Малышев
Asked: 2020-09-03 18:18:48 +0000 UTC

Qmake 和重建所有

  • 3

请解释这些按钮如何在 Qtcreator 中工作。

我在几个指南中读到 qmake 执行 pro 文件。这些文件描述了如何将项目组装成工作程序(粗略地说)。关于重建所有我在任何地方都没有看到任何信息。

我在我的电脑上测试了很多次,发现 Rebuild All 完成了 pro 文件中编写的所有内容,除了功能。而 qmake 只执行功能。我是否正确理解这一点,还是取决于某些设置?是否可以将其配置为使用单个按钮执行两个操作?

每个按钮的具体作用是什么?在网上,这方面的信息很模糊,好像大家都知道一样,不言而喻。

示例:该项目有一个文件 iss_generator.pri。它连接到pro文件如下。

include(iss_generator.pri)

这是此文件的代码。

iss_file = $$DeployDir/install.iss

iss ="Здесь большой текст этого файла"

write_file($$iss_file, iss)

该文件仅使用 qmake 出现在文件夹中。在构建期间不出现。

qtcreator
  • 1 个回答
  • 10 Views
Martin Hope
Трипольский Пётр
Asked: 2020-09-08 20:24:43 +0000 UTC

如何摆脱更新的 Qt Creator 图标

  • -2

我主观认为新的 Qt Creator 图标是用 Paint 绘制的。请告诉我,我可以把它回滚到旧的吗?

在此处输入图像描述

qtcreator
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5