Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • How to paint unicode surrogate pairs using QPainter?

    2
    0 Votes
    2 Posts
    1k Views
    B
    I tested this problem with a QTextEdit control, QTextEdit have the same problem - it can't display the complex Chinese character.
  • 0 Votes
    3 Posts
    5k Views
    S
    Thank you Lukas for the help. As mentioned above, QT3 compatible members will not be working in QT5. We should try to modify the usage of deprecated members as much as possible. If in case there is no choice left then only we can use the define in project (.pro) file (first statement possible) as @DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000@
  • Need an example for proecessing unicode input and input method

    3
    0 Votes
    3 Posts
    2k Views
    W
    The post is very good.
  • Search, multithread, Internet

    1
    0 Votes
    1 Posts
    551 Views
    No one has replied
  • Getting rid of OpenGL warnings on machines without HW acceleration

    3
    0 Votes
    3 Posts
    6k Views
    A
    HW acceleration is disabled. That is, the option "3D acceleration" under "Display" - "Extended features" is disabled. It was enabled at first, and I got a ton more errors. Edit: Here are the errors I get with HW acceleration enabled: @OpenGL Warning: XGetVisualInfo returned 0 visuals for 0xa21e2a0 OpenGL Warning: Retry with 0x8002 returned 0 visuals OpenGL Warning: XGetVisualInfo returned 0 visuals for 0xa21e2a0 OpenGL Warning: Retry with 0x8002 returned 0 visuals OpenGL Warning: XGetVisualInfo returned 0 visuals for 0xa21e2a0 OpenGL Warning: Retry with 0x8002 returned 0 visuals OpenGL Warning: glXGetFBConfigAttrib for 0xa21e2a0, failed to get XVisualInfo OpenGL Warning: XGetVisualInfo returned 0 visuals for 0xa21e2a0 OpenGL Warning: Retry with 0x8002 returned 0 visuals OpenGL Warning: glXGetFBConfigAttrib for 0xa21e2a0, failed to get XVisualInfo OpenGL Warning: XGetVisualInfo returned 0 visuals for 0xa21e2a0 OpenGL Warning: Retry with 0x8002 returned 0 visuals OpenGL Warning: glXGetFBConfigAttrib for 0xa21e2a0, failed to get XVisualInfo OpenGL Warning: XGetVisualInfo returned 0 visuals for 0xa21e2a0 OpenGL Warning: Retry with 0x8002 returned 0 visuals OpenGL Warning: glXGetFBConfigAttrib for 0xa21e2a0, failed to get XVisualInfo OpenGL Warning: XGetVisualInfo returned 0 visuals for 0xa21e2a0 OpenGL Warning: Retry with 0x8002 returned 0 visuals OpenGL Warning: glXGetFBConfigAttrib for 0xa21e2a0, failed to get XVisualInfo OpenGL Warning: XGetVisualInfo returned 0 visuals for 0xa21e2a0 OpenGL Warning: Retry with 0x8002 returned 0 visuals OpenGL Warning: glXGetFBConfigAttrib for 0xa21e2a0, failed to get XVisualInfo OpenGL Warning: XGetVisualInfo returned 0 visuals for 0xa21e2a0 OpenGL Warning: Retry with 0x8002 returned 0 visuals OpenGL Warning: glXGetFBConfigAttrib for 0xa21e2a0, failed to get XVisualInfo OpenGL Warning: XGetVisualInfo returned 0 visuals for 0xa21e2a0 OpenGL Warning: Retry with 0x8002 returned 0 visuals OpenGL Warning: glXGetFBConfigAttrib for 0xa21e2a0, failed to get XVisualInfo@ Edit 2: I should stress that the program paints correctly either way - with HW acceleration enabled or disabled. Also, the Linux in the VirtualBox runs pretty slowly (especially new windows are real slow to appear) - maybe there's a configuration problem. Edit 3: I tried the same VirtualBox on a better computer, it runs smoothly there, but the error messages are the same.
  • [SOLVED] Problems capturing QGraphicsView in QImage

    3
    0 Votes
    3 Posts
    3k Views
    S
    It turns out the line @ _mapView = new MapView(_parent); @ was clipping the view. By setting the parent to NULL in my test cases, I got the whole view saved in the QImage.
  • QSvgRenderer draw text incorrect after QDomDocument.

    3
    0 Votes
    3 Posts
    3k Views
    R
    Fixed by: @doc.toString(0).replace(">\n<tspan", "><tspan")@ QDomDocument by default write each tag on new line, but by "SVG spec":http://www.w3.org/TR/SVGTiny12/text.html#TSpanElement <tspan> on new line equated to space.
  • Noob at librarys

    4
    0 Votes
    4 Posts
    2k Views
    sierdzioS
    I'm happy to hear that. Please add [Solved] to the beginning of this topic's subject. Happy coding!
  • Inheriting from QObjectPrivate

    4
    0 Votes
    4 Posts
    8k Views
    sierdzioS
    Headers are private for a reason. If you choose to use them, you are doing it on your responsibility. There is no promise of any compatibility for private APIs, even between patch releases. Of course, in real life, most of the code will stay the same for long periods of time. There is nothing inherently wrong about it, you just need to recompile your project every time you update the libraries, and be very careful to use right version with your application, including user machines.
  • Problem opening a .pro file in Qt creator: Program stops responding

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Qt 5: Unknown iconengines and jpeg modules

    1
    0 Votes
    1 Posts
    910 Views
    No one has replied
  • 0 Votes
    7 Posts
    7k Views
    adaitabeheraA
    Thanks MuldeR. I got it now. It is quite clear now.
  • QListView with QSortFilterProxyModel

    1
    0 Votes
    1 Posts
    786 Views
    No one has replied
  • Need Help Installing MySQL Driver on Windows XP 32-Bit for QT 5

    2
    0 Votes
    2 Posts
    2k Views
    C
    Hi Albert, I had a similar problem with the Linux QT5 and the psql driver. If you get the "Cannot find mysql.pro" you probably won't have the sources installed? You should check that first and once you have localized your mysql.pro just try compiling the plugin with the Creator. Good luck Erich
  • QT5 - Trying to get actual size of a video

    1
    0 Votes
    1 Posts
    762 Views
    No one has replied
  • Install QT 5.0 on windows 7 64bit

    11
    0 Votes
    11 Posts
    31k Views
    F
    Here is the build of Qt5.0+msvc2010 and windows7 x64. 11:33:55: Running steps for project untitled... 11:33:55: Starting: "C:\qt\Qt5.0.0\5.0.0\msvc2010\bin\qmake.exe" C:\qt\projects\untitled\untitled.pro -r -spec win32-msvc2010 11:33:56: The process "C:\qt\Qt5.0.0\5.0.0\msvc2010\bin\qmake.exe" exited normally. 11:33:56: Starting: "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" -f Makefile.Release C:\Qt\Qt5.0.0\5.0.0\msvc2010\bin\uic.exe ..\untitled\mainwindow.ui -o ui_mainwindow.h C:\Qt\Qt5.0.0\5.0.0\msvc2010\bin\moc.exe -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include" -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtWidgets" -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtNetwork" -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtGui" -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtCore" -I"release" -I"." -I"." -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\mkspecs\win32-msvc2010" -D_MSC_VER=1600 -DWIN32 ..\untitled\mainwindow.h -o release\moc_mainwindow.cpp cl -c -nologo -Zm200 -Zc:wchar_t -O2 -MD -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include" -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtWidgets" -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtNetwork" -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtGui" -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtCore" -I"release" -I"." -I"." -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\mkspecs\win32-msvc2010" -Forelease\ @C:\Users\Portela\AppData\Local\Temp\nm86AF.tmp main.cpp mainwindow.cpp Generating Code... cl -c -nologo -Zm200 -Zc:wchar_t -O2 -MD -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include" -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtWidgets" -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtNetwork" -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtGui" -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\include\QtCore" -I"release" -I"." -I"." -I"......\Qt\Qt5.0.0\5.0.0\msvc2010\mkspecs\win32-msvc2010" -Forelease\ @C:\Users\Portela\AppData\Local\Temp\nm8B52.tmp moc_mainwindow.cpp link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /MANIFEST /MANIFESTFILE:release\untitled.exe.embed.manifest /OUT:release\untitled.exe @C:\Users\Portela\AppData\Local\Temp\nm8CF8.tmp mt.exe /nologo /manifest release\untitled.exe.embed.manifest /outputresource:release\untitled.exe;1 11:33:59: The process "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" exited normally.
  • How to play from buffer in Phonon media player?

    2
    0 Votes
    2 Posts
    2k Views
    I
    You can use QAudioOuput to play audio data. It has two modes of usage. In one case copy data to some buffer and then start QAudioOutput with this buffer. You can use this in case you have all data before start. In other case starting QAudioOutput returns pointer for QIODevice which you can use to write your data while it arriving. P.S. In later case you can check available space in output buffer and write accordingly.
  • What is required for 3D in QtQuick 2?

    4
    0 Votes
    4 Posts
    2k Views
    JKSHJ
    I'm not sure, sorry. But apparently, Qt 3D is incomplete and not fully usable: http://lists.qt-project.org/pipermail/interest/2012-December/004930.html (You can probably sign up at the mailing list and ask there -- someone might be able to tell you how to install it)
  • [SOLVED] Window style

    6
    0 Votes
    6 Posts
    3k Views
    J
    I'm glad you got it working :) . Please mark thread as solved. Regards, Jake
  • I do not understand this syntax, which does not work

    3
    0 Votes
    3 Posts
    2k Views
    JKSHJ
    Hello, Have a look at C++ syntax for function pointers (especially pointers-to-member-functions). For the new version of QObject::connect() with 4 arguments, the arguments are: Pointer to the object that emits the signal Pointer to the member-function that acts as the signal Pointer to the object that receives the signal Pointer to the member-function that acts as the slot Your example uses a version with 3 arguments, which are: Pointer to the object that emits the signal Pointer to the member-function that acts as the signal Pointer to the non-member-function to be invoked [quote author="nostrora" date="1356603974"]in the doc here is the syntax @connect (sender, & Sender :: valueChanged,               receiver, Receiver & updateValue ::);@ [/quote]Be careful -- You have an extra "::" at the end [quote author="nostrora" date="1356603974"] @QObject :: connect (m_actionQuitter, and QAction :: triggered, creerMenu ());@ [/quote]Don't write "and". In C++, "&" has special meanings. If creerMenu() doesn't belong to a class, there are two correct ways to write it: @ QObject::connect(m_actionQuitter, &QAction::triggered, creerMenu); QObject::connect(m_actionQuitter, &QAction::triggered, &creerMenu); @ But, if creerMenu() belongs to a class, use Jake007's version.