Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.7k Posts
  • display image in qt

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    K
    @Rameshguru Does the tif file you are saving look correct? How exactly does it not work? Are you aware of this requirement for the constructor you are using "data must be 32-bit aligned, and each scanline of data in the image must also be 32-bit aligned"?, make sure your data conforms to that.
  • convert QString list to QList<int>

    Solved
    7
    0 Votes
    7 Posts
    8k Views
    J.HilkJ
    @isan said in convert QString list to QList<int>: QStringList timelist; QList<int> val3; for (int v = 0; v <= 300 ; v++) { foreach(QString num, timelist[v]){ std::cout << "\n"<<num.toInt() << endl; val3.append(num.toInt()); } std:: cout<<"\n out"<<val3[v]; } but I get **ASSERT failure in QList<T>::operator[]: "index out of range"** how should I define QList? You have the potential to Go out of bounds at at least 2 positions. Like @JonB said, we don‘t know if 300 is inside the Range of v. It doesn‘t really matter anyway, because this line after the loop std:: cout<<"\n out"<<val3[v]; Is garantied to always be out of range. Val has 300 entries, and you‘re trying to access the 301‘s
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • Emit Problems

    Solved
    6
    0 Votes
    6 Posts
    887 Views
    D
    @kshegunov Thanks, seems to work now after the changes you suggested! :) I also updated the gist with the working code.
  • QT-Ceator with intel compiler on Windows

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    kshegunovK
    @FGin said in QT-Ceator with intel compiler on Windows: the Problem is i don't have the correct options in the drop down menus to configure the ABI signature of the compiler correctly. How so? Are there other ways to configure it? Not that I'm aware of. Is it possible that the ABI signature of the Qt library isn't detected correctly, because i build it with the intel compiler and here it says msvc2013? Maybe, but rather improbable. If i configure the compiler with the same ABI as my library i can get rid of the error but i'm running then immediately into this error Run qmake with -d or -d -d and inspect the debug log.
  • QDataStream detect unsupported newer version.

    Solved
    12
    0 Votes
    12 Posts
    3k Views
    kshegunovK
    @VRonin said in QDataStream detect unsupported newer version.: How do I detect the fact that oldVersion here contains a value that is too new to my current Qt version? QDataStream stream(device); int currentVersion = stream.version(); // Latest possible stream.setVersion(QDataStream::Qt_5_0); stream >> dataVersion; if (currentVersion < dataVersion) return; // Ooops I did it again stream.setVersion(oldVersion); stream >> map;
  • How to draw an outline offset from a QPainterPath?

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    kshegunovK
    Look here, Chris' answer in particular: https://forum.qt.io/topic/62142/qpainterpath-from-list-of-points/21
  • Mint - GStreamer-WARNING **: Failed to load plugin

    Unsolved
    4
    0 Votes
    4 Posts
    4k Views
    SGaistS
    Inside Qt Creator, it's because you are re-building for Mint, therefore it uses directly the libraries present on the system. As for the version generated on Debian by linuxdeployqt, did you check what was included with the application ?
  • qml-terminal-example-console-something-like-tera-term

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    SGaistS
    Hi, Next time you open a thread in the wrong section, please ask a moderator to move it rather than linking to it like that. Since you already got an answer here, I'd recommend copying the original text and title over here and delete the other thread.
  • wait for slot to finished

    Unsolved
    2
    0 Votes
    2 Posts
    879 Views
    sierdzioS
    if (canEmit) { canEmit = false; emit mySignal(); } // Slot: void mySlot() { doSomething(); emit processingFinished(); } // The previous class, slot: void onProcessingFinished() { canEmit = true; }
  • Best way to init QWidgetAction when shown from QToolButton's menu?

    Solved
    3
    0 Votes
    3 Posts
    442 Views
    P
    Perfect! I knew there was a better way than installing an event filter....
  • webengine function does not take 0 arguments

    Moved Unsolved
    3
    0 Votes
    3 Posts
    733 Views
    elicatE
    @sierdzio thanks
  • Create Thread

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    BuckwheatB
    Hi @Pranit-Patil ! Welcome! The first thing you need to remember is that GUI items should not be created in any thread other than the main thread. QTimers are especially tempermental I have found to only respond to the owning thread. What I typically do, is create the QProgress or QMovie (for ajax style) in the main thread. My worker thread then just shows and set values. If you want something global (across DLLs and plugins) I typically have some forwarding signals in the qApp. This allows consistent user interface experience for progress. My progress singleton interface connects to those and the plugin or thread or other object simply calls into it. Using a worker thread, keeps the design simple. I am starting to like QtConcurrent since I am using more worker functions in a larger object to process data (like files). You have a lot of control over the threads and they are run from a pool so you can reuse the resources easier. Another really good blog: https://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/
  • QNetworkRequest force to use HTTP 1.0

    Unsolved
    3
    0 Votes
    3 Posts
    658 Views
    raven-worxR
    @trallallerotrallalla All Qt network requests are fixed to HTTP/1.1 The only way to enforce HTTP/1.0 is to create a custom QTcpSocket to the server and send a "raw" request. But this means you will have to do the HTTP parsing of the response all by yourself.
  • Display text name file when push button is clicked

    Unsolved
    5
    0 Votes
    5 Posts
    661 Views
    L
    Thank you mrjj !
  • outlook.exe does not exist

    Solved
    15
    0 Votes
    15 Posts
    2k Views
    JonBJ
    @nicholaslee It is unclear why you should ever receive the message: Executable D:\Desktop\build-Outlook-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\Outlook.exe does not exist. The executable for your project should be that path but with Qutlook.exe instead of Outlook.exe at the end. The question is where your Outlook.exe is coming from. I do not believe your app is getting as far as any attempt to use/contact any MS Outlook stuff, it is failing to find the executable of your app to run in the fist place. It seems to be attempting to run the wrong executable name. You could at least test that by having your code output a message very first thing, which I think you will not see. Furthermore, the path includes build-Outlook-Desktop_Qt_5_0_2_MinGW_32bit-Debug. Why is that Outlook and not Qutlook? Did you name the project Outlook rather than Qutlook at some point? I would look carefully at your project.
  • DigistAuth for QMediaPlayer

    Unsolved
    1
    0 Votes
    1 Posts
    260 Views
    No one has replied
  • Can't remove file

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    Roy44R
    It works with new permissions. thanks
  • QOpenGLWidget makes entire window black on resize

    Unsolved
    3
    0 Votes
    3 Posts
    792 Views
    XYZ916X
    @Roy44 Have you solve your problem? I have the same problem as you mentioned. If you have any ideas on the problem ,I'll appreciate it when you can share your solutions with me .Thank you~
  • QRegExp Global Flag

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    webzoidW
    @JonB Works like a treat, thanks for your help. I shall no longer use QRegExp. Thanks again