Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.5k Posts
  • [SOLVED]How to make the Widget transparent with styleSheet

    5
    0 Votes
    5 Posts
    5k Views
    S
    [quote author="sirnodin" date="1355812795"]Well, i add a @ setAttribute(Qt::WA_TranslucentBackground, true); @ int the cpp file. it seems to work fine.... Maybe my problem is solved.[/quote] Yeah i forgot to add that one. For reference there are some other topics "here":http://doc.qt.digia.com/qq/qq16-background.html and "here":http://qt-project.org/forums/viewthread/1107 Regards Soumitra.
  • Display image in Qlabel

    6
    0 Votes
    6 Posts
    13k Views
    T
    Hi, Now I found that my thread implementation doesn't work well. I followed the idea discussed in the link http://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/ But somehow, it didn't work well. When the worker thread runs, my main thread is frozen, the whole UI is also frozen. That threading idea doesn't work. Now I changed to timer, whenever the timer timeout, it calls the MainWindow's slot method. Now I can display the image. Thanks
  • Open unicode file name in Qt4.7

    11
    0 Votes
    11 Posts
    7k Views
    M
    Passing Unicode strings into command-line tools does work fine, as long as that tool uses wmain() or retrieves the command-line args via GetCommandlineW(). If the tool uses main(), it will get the command-line args converted to the local ANSI codepage, and the we have the mess again... Printing Unicode strings to the console is a problem of its own. You can change the codepage of the Windows console to UTF-8 via SetConsoleOutputCP(), but then you still need to get your UTF-8 string into the console without the CRT messing up your string! printf() or cout<< don't work in my experience, because they are not UTF-8 aware and will mangle your UTF-8 strings. wprintf() or wcout<< will take UTF-16 (wchar_t) strings as input, but then convert them to the local ANSI codepage before passing them to console! My solution is using the Win32 API directly, i.e. print your string via GetStdHandle() and WriteFile(), bypassing the CRT. Either that or using "setmode(fileno(stdout), O_BINARY)" to change the stdout to binary mode, so printf() won't mangle your UTF-8 strings anymore. The latter has the drawback that, after that, using wprintf() or wcout<< will crash the CRT...
  • Inheritance classes draw errors: cannot allocate objects of abstract type

    3
    0 Votes
    3 Posts
    5k Views
    A
    Thank you Lukas ... I have been able to proceed with it now.
  • Ignore pushbutton when using focusWidget()

    5
    0 Votes
    5 Posts
    2k Views
    M
    You might also look into maybe some magic with setFocusProxy(). Haven't really thought it through, but there might be something that could be made to work.
  • QtCreator fails with Segmentation Fault.

    6
    0 Votes
    6 Posts
    3k Views
    T
    ujwala: Please do not hijack other peoples threads with unrelated issues.
  • Qt5 Multimedia Problem

    13
    0 Votes
    13 Posts
    10k Views
    O
    Hi ! I just want to know if the issue has been corrected in the RC2 release for Windows OS... I still have the problem but my dev env is properly configurated : bq. Démarrer C:\Qt\Qt5.0.0-rc2\5.0.0-rc2\msvc2010\bin\qmlscene.exe "D:/Documents and Settings/T0119276/Mes Documents/QML_APP/TEST_QML_5/TEST_QML_5.qml" QQmlImportDatabase::addImportPath: "C:\Qt\Qt5.0.0-rc2\5.0.0-rc2\msvc2010\qml" QQmlImportDatabase::addImportPath: "C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/bin" QQmlImports(file:///D:/Documents and Settings/T0119276/Mes Documents/QML_APP/TEST_QML_5/TEST_QML_5.qml)::addImplicitImport QQmlImports(file:///D:/Documents and Settings/T0119276/Mes Documents/QML_APP/TEST_QML_5/TEST_QML_5.qml)::addLibraryImport: "QtQuick" 2.0 as "" QQmlImports(file:///D:/Documents and Settings/T0119276/Mes Documents/QML_APP/TEST_QML_5/TEST_QML_5.qml)::importExtension: loaded "C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtQuick.2/qmldir" QQmlImportDatabase::importPlugin: "QtQuick" from "C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtQuick.2/qtquick2plugin.dll" QQmlImports(file:///D:/Documents and Settings/T0119276/Mes Documents/QML_APP/TEST_QML_5/TEST_QML_5.qml)::addLibraryImport: "QtMultimedia" 5.0 as "" QQmlImports(file:///D:/Documents and Settings/T0119276/Mes Documents/QML_APP/TEST_QML_5/TEST_QML_5.qml)::importExtension: loaded "C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/qmldir" QQmlImportDatabase::importPlugin: "QtMultimedia" from "C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/declarative_multimedia.dll" Module 'QtMultimedia' does not contain a module identifier directive - it cannot be protected from external registrations. QQmlImports(file:///D:/Documents and Settings/T0119276/Mes Documents/QML_APP/TEST_QML_5/TEST_QML_5.qml)::resolveType: "Video" => "file:///C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/Video.qml" URL QQmlImports(file:///C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/Video.qml)::addImplicitImport QQmlImports(file:///C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/Video.qml)::importExtension: loaded "C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/qmldir" QQmlImports(file:///C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/Video.qml)::addLibraryImport: "QtQuick" 2.0 as "" QQmlImports(file:///C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/Video.qml)::importExtension: loaded "C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtQuick.2/qmldir" QQmlImports(file:///C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/Video.qml)::addLibraryImport: "QtMultimedia" 5.0 as "" QQmlImports(file:///C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/Video.qml)::importExtension: loaded "C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/qmldir" QQmlImports(file:///C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/Video.qml)::resolveType: "Item" => "QQuickItem" TYPE QQmlImports(file:///C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/Video.qml)::resolveType: "VideoOutput" => "QDeclarativeVideoOutput" TYPE QQmlImports(file:///C:/Qt/Qt5.0.0-rc2/5.0.0-rc2/msvc2010/qml/QtMultimedia/Video.qml)::resolveType: "MediaPlayer" => "QDeclarativeAudio" TYPE defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer" C:\Qt\Qt5.0.0-rc2\5.0.0-rc2\msvc2010\bin\qmlscene.exe a quitté avec le code 0
  • [SOLVED] Leak issue using QtConcurrent

    5
    0 Votes
    5 Posts
    4k Views
    J
    Thanks for the confirmation for the QMutex: that's what I was thinking but I was not sure it was the best way to do it. Actually the new QMutex was the problem. The code was supposed to go through this condition only once per channel but it was apparently not the case. I've added some control before creating a new QMutex and the leak has disappeared. Thanks for stressing what should have been obvious to me.
  • QMainWindow top left position excluding frames and menu bar?

    5
    0 Votes
    5 Posts
    4k Views
    T
    Hi, did you try "mapToGlobal":http://qt-project.org/doc/qt-4.8/qwidget.html#mapToGlobal
  • Drag & drop from/to desktop or folder in Windows or Linux

    2
    0 Votes
    2 Posts
    3k Views
    C
    Sorry for asking a question about a fully documented topic. I assumed that the documented Drag and Drop was for operations between widgets of the same application. They are remnants of BCB. Full documentation: "http://qt-project.org/doc/qt-4.8/dnd.html":http://qt-project.org/doc/qt-4.8/dnd.html Best regards.
  • [SOLVED] Problem with UI designer...

    3
    0 Votes
    3 Posts
    1k Views
    L
    I totally forgot about it. i changed sizeadjustpolicy to adjust to contents and it works :)
  • QString object, very odd behaviour!

    5
    0 Votes
    5 Posts
    2k Views
    G
    thank you for your time!!
  • [SOLVED]how to wait on multiple wait conditions/event

    2
    0 Votes
    2 Posts
    3k Views
    A
    As per my knowledge there is no direct API available by qt to deal with such kind of scenario. How I mitigate this problem is by taking help from localserver, localclient support of qt. What I did is that I created one local server in my app, and the place from where I wanted to raise multiple event , there I just created a localsocket. Now I can transfer one byte of data every time when I wanted to raise an event , and this 1 byte of dtaa value will differ based on my requirement(signal type/event type).
  • Scrolling a QTableWidget while it is populating

    3
    0 Votes
    3 Posts
    1k Views
    M
    If it is Solved, kindly prepend [Solved] to your Question.... Thanks & Regards
  • QT and OpenGL for games

    3
    0 Votes
    3 Posts
    3k Views
    Z
    I agree with Tobias. In fact Qt5 with QWindow, QOpenGLContext and friends is actually a very nice alternative to SDL, glut etc. How you keep the event loop responsive is entirely down to what you do in the main thread. You can of course offload your rendering to a worker thread - Qt Quick 2 does exactly this.
  • OpenGL issues in QT5

    2
    0 Votes
    2 Posts
    2k Views
    Z
    My advice is start off simple and just use a QWindow subclass, create yourself a QOpenGLContext to get your own rendering working. Once that is working, change your window class to inherit from QDeclarativeView and set a QML scene on it and integrate your rendering. These two videos may be of interest to you ;) http://www.youtube.com/watch?v=VxsS7u-vgc8&list=PLizsthdRd0YzYe5T3Txgg7TUGVi-ijq4d&index=20 http://www.youtube.com/watch?v=GYa5DLV6ADQ&list=PLizsthdRd0YzYe5T3Txgg7TUGVi-ijq4d&index=21
  • QTextEdit; adjustSize() not working?

    3
    0 Votes
    3 Posts
    3k Views
    G
    Thanks for your help :) but I solved it by calculating width and height and setting the geometry.
  • Regarding the navigation from one window to other

    13
    0 Votes
    13 Posts
    7k Views
    S
    i have read the Qwt examples . but there is no proper guidance
  • MinGW and Qt 5.0 RC

    2
    0 Votes
    2 Posts
    1k Views
    I
    Developers has plan for it "http://blog.qt.digia.com/blog/2012/12/13/qt-5-0-rc2-released/#comment-116858":http://blog.qt.digia.com/blog/2012/12/13/qt-5-0-rc2-released/#comment-116858 If not with 5.0 Release then with 5.0.1.
  • Principles in connecting multiple apps in an AD-HOC connection

    8
    0 Votes
    8 Posts
    4k Views
    C
    Thanks Mulder!