首页 \ 问答 \ Windows 8下的InAppBrowser不起作用(InAppBrowser under Windows 8 doesn´t work)

Windows 8下的InAppBrowser不起作用(InAppBrowser under Windows 8 doesn´t work)

我在不同平台下的Cordova项目中工作,例如iOS和Windows 8平板电脑,这个应用程序支持IE11或Chrome等浏览器,但我在使用InAppBrowser插件时遇到问题,在W8平板电脑下没有工作,如果你在不同的按钮“点击”打开附件,这个事件不起作用......有什么问题??!

我有一个班级来管理下一个代码...

openLinkInNewWindow: function (url) {
    var link = Ext.getDom(this.getLinkId()),
        clickevent = document.createEvent('Event'),
        hash = location.hash;

    if (Ext.browser.is.Standalone) {
        localStorage.setItem('lastVisitRouteForLunchApp', hash);
    }
    if (Ext.os.deviceType == "Tablet" && Ext.os.name == "Windows") {
        window.open(url, '_blank', 'location=yes');
    }
    if (Ext.os.deviceType == "Tablet" && Ext.os.name == "iOS") {
        window.open(url, '_blank', 'location=yes');
    } else {
        link.href = url;
        Ext.Function.defer(function () {
            clickevent.initEvent('click', true, false);
            link.dispatchEvent(clickevent);
        }, 500);
    }
}

我究竟做错了什么? (代码基于Sencha Touch Framework)


I am working in a Cordova project under different platforms, for example iOS and Windows 8 tablet, this app works has support in browsers like IE11 or Chrome, but I am having problems with the implementation with the InAppBrowser plugin, under W8 tablet doesn´t work and if you do "tap" in different buttons to open attachments, this event doesn´t work... What is the problem??!

I have a class to manage this with the next code...

openLinkInNewWindow: function (url) {
    var link = Ext.getDom(this.getLinkId()),
        clickevent = document.createEvent('Event'),
        hash = location.hash;

    if (Ext.browser.is.Standalone) {
        localStorage.setItem('lastVisitRouteForLunchApp', hash);
    }
    if (Ext.os.deviceType == "Tablet" && Ext.os.name == "Windows") {
        window.open(url, '_blank', 'location=yes');
    }
    if (Ext.os.deviceType == "Tablet" && Ext.os.name == "iOS") {
        window.open(url, '_blank', 'location=yes');
    } else {
        link.href = url;
        Ext.Function.defer(function () {
            clickevent.initEvent('click', true, false);
            link.dispatchEvent(clickevent);
        }, 500);
    }
}

What am I doing wrong? (code is based in Sencha Touch Framework)


原文:https://stackoverflow.com/questions/30169266
更新时间:2023-02-16 17:02

最满意答案

编辑您的个人资料。 它应该有这样一行:

QT += core gui

在此行中附加所需的模块。 要获取模块的名称,只需删除此列表中的“Qt”部分即可。 (例如QtSql变成“sql”)


Edit your .pro file. It should has one line like this:

QT += core gui

Append the desired modules in this line. To get the module's names, just remove the "Qt" part in this list. (e.g. QtSql turns "sql")

相关问答

更多
  • 只是在这里添加一些更具体的信息。 当我最初在Windows上安装QtSDK时,我只有用于构建的MVSC选项。 为了解决这个问题,运行Update QT SDK程序并选择包管理器选项,点击下一步。 展开“Qt SDK” - >“开发工具” - >“桌面QT” - >“您的QT Verision(在撰写本文时为4.8.0(桌面))”,您应该只看到Qt旁边的复选框MSVC版本。 同时检查MinGW选项并在底部点击。 这将为qt创建者下载并安装mingw构建工具链。 然后您可以选择MinGW构建而不是MSVC。 J ...
  • 据我所知,现在是不可能的。 唯一的方法是编辑.pro文件并添加这样的行: win32 { #/* If you compile with QtCreator/gcc: */ win32-g++:LIBS += -L"$$_PRO_FILE_PWD_/libs/" win32-g++:LIBS += -lyaml-cpp #/* IF you compile with MSVC: #win32-msvc:LIBS += /path/to/your/libMyLib.l ...
  • 这样做的正确方法是这样的: LIBS += -L/path/to -lpsapi 这样就可以在Qt支持的所有平台上工作。 想法是你必须将目录与库名分开(没有扩展名,没有任何'lib'前缀)。 当然,如果你包括一个Windows特定的lib,这真的没关系。 如果要将lib文件存储在项目目录中,可以使用$$_PRO_FILE_PWD_变量来引用它们,例如: LIBS += -L"$$_PRO_FILE_PWD_/3rdparty/libs/" -lpsapi The proper way to do thi ...
  • 您需要一些Debian / Ubuntu软件包: sudo apt-get install libqt5webkit5 libqt5webkit5-dev libqt5webkit5-qmlwebkitplugin 某些模块有时难以找到包裹。 只需使用`apt-cache search'包'“或Synaptic Package Manager,并输入qt以及模块名称(例如”qtwebkit“)。 以下是包含该模块的示例: import QtQuick 2.0 import QtWebKit 3.0 Pag ...
  • 在粉碎了我的脑袋一段时间后,我最终重组了我的项目并使用make而不是qmake。 这就像一个魅力。 然后我将我的自定义make脚本添加到Qt Creator中的构建步骤,以便我可以使用ctrl + r构建和运行。 After smashing my head against this for a while I ended up restructuring my project and using make instead of qmake. That worked like a charm. Then I ...
  • 如果您安装了SC系统,则在“工具”菜单下,您会看到它已列出。 例如,在我的作品中,Git似乎是一种选择。 选择Git时,子菜单有一个Create Repository选项。 选择后,它会要求您选择存储库的文件夹。 您需要安装外部工具,然后配置Qt创建者才能使用这些工具。 在Preferences下,选择Version Control,然后选择Git选项卡。 确保Git工具在Path中。 看这里的工具; https://git-scm.com/downloads 。 If you have a SC syst ...
  • 编辑您的个人资料。 它应该有这样一行: QT += core gui 在此行中附加所需的模块。 要获取模块的名称,只需删除此列表中的“Qt”部分即可。 (例如QtSql变成“sql”) Edit your .pro file. It should has one line like this: QT += core gui Append the desired modules in this line. To get the module's names, just remove the "Qt" pa ...
  • 是的,Creator有一个部分,您可以在其中设置运行应用程序所需的任何环境。 在Creator 2.0.0上,可通过以下方式访问:项目 - >目标 - >(您的目标) - >运行 - >运行环境(打开项目后) 然后,您可以添加或删除任何您想要的环境变量,包括LD_LIBRARY_PATH我不确定的一件事是如果可以将构建路径替换为这些变量的值,以便您不必硬编码到您的LD_LIBRARY_PATH 。 另一个选择是将一个小的shell脚本添加到源代码树中,该脚本设置所需的任何变量,并添加“自定义可执行文件”运行 ...
  • 我有同样的问题。 尝试从BIN文件夹中选择“qmake.exe”,而不是qmake文件夹,所以在你的情况下可能是P:\ Qt \ Libs \ 4.8.4 \ bin \ qmake.exe Based on SO: How to install Qt on Windows after building? I eventually got to http://qt-project.org/doc/qt-4.8/install-win.html Simply running configure solved ...
  • 我总是明确添加我的头文件,以避免任何意外。 但在使用QtCreator 4.2.0和cmake 3.7.1的MacOS上,我无法重现您的问题。 但是,我建议使用以下结构来了解项目中的文件,并在更新CMakeLists.txt期间触发cmake数据的更新。 在project / CMakeLists.txt中: add_subdirectory(src) include_directory(include) add_executable(foo ${SRC_LIST}) 在project / src / C ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)