Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. QT 5.1的两个Bug
Forum Updated to NodeBB v4.3 + New Features

QT 5.1的两个Bug

Scheduled Pinned Locked Moved Chinese
2 Posts 2 Posters 2.9k Views 1 Watching
  • 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.
  • Z Offline
    Z Offline
    zixialang
    wrote on last edited by
    #1

    由于QT4.7.0不支持OpenGL的双缓冲画图,最近一直致力于寻找一个比较好的版本,于是试用了QT 5.1,不承想,却发现了它的两个Bug,现描述如下,希望后来者少走弯路。

    1、使用QFileDialog获取保存图片的文件名时,getFileName()函数在Win XP下无法获取扩展名,而在win7下没有问题。

    2、使用QMdiArea管理多文档窗口,在TabbedView模式下,当只打开一个窗口时,使用avtiveWindow()无法获取,closeActiveWindow()无法关闭;当打开多个窗口时,一切OK。

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jiangcaiyang
      wrote on last edited by
      #2

      谢谢分享,不过在Qt5.1中QFileDialog没有getFileName()函数,倒是有一个getOpenFileName()函数。
      1、如果的确需要获得扩展名的话,使用QFileInfo::suffix()结合QFileDialog即可。
      2、没有遇到过。

      1 Reply Last reply
      0

      • Login

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