Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • libusb initialization crash

    Unsolved
    2
    0 Votes
    2 Posts
    335 Views
    Pablo J. RoginaP
    @SherifOmran you may need to improve your post, by providing more details. What compiler are you using? Did you download pre-built binaries from the libusb project? If so, are you sure they match the compiler you're using? Are you able to build and run the examples (non Qt apps) provided by the libusb project? Eventually, show the code snippet where you initialize the library
  • I can't find

    Unsolved
    5
    0 Votes
    5 Posts
    417 Views
    D
    @JonB thank you
  • Can someone help me fix this part of a recursive class

    Unsolved
    5
    0 Votes
    5 Posts
    409 Views
    JonBJ
    @AI_Messiah said in Can someone help me fix this part of a recursive class: I get some error message about the type it suggests const, but I add const and it doesn't help When asking for help, you are supposed to copy & paste the error message, which probably shows a line number, and show whatever you tried to resolve. Rather than leaving people to just guess.
  • Alexa with Qt Calendar

    Unsolved
    2
    0 Votes
    2 Posts
    202 Views
    JonBJ
    @Paras You would need to read up on Alexa documentation for this. I don't see anything in Qt which talks about integration with Alexa, other than possibly in Qt Automotive, which is a commercial offering anyway.
  • QScrollArea Not Expanding QCreate

    Solved
    10
    0 Votes
    10 Posts
    500 Views
    C
    @SGaist Sorry for the long reply, I was afk. What you said worked! Really need to watch those layouts, gotta set the QScrollArea to have a QWidget in it, that widget gets the main layout you want and it expands as you need.Thank you for your help and time!
  • fragmentation error when using Qtcpsocket write

    Unsolved
    3
    0 Votes
    3 Posts
    303 Views
    SGaistS
    Hi and welcome to devnet, From the looks of it you are expecting your client to receive all the data you sent in one go. That's not how tcp works. It's up to you cumulate the data you receive contains a full frame. You can use QDataStream and transactions.
  • [SOLVED] Convert #define value to QString?

    10
    0 Votes
    10 Posts
    11k Views
    SGaistS
    Hi, It would be simpler to use a generated header. The double quote escaping won't work on all platforms.
  • How to set enviorment variable from . pro file?

    Unsolved
    6
    0 Votes
    6 Posts
    496 Views
    Christian EhrlicherC
    Since you know when you run your tool with valgrind you can also set this env var before.
  • Associating a file type to my program?

    Unsolved
    15
    0 Votes
    15 Posts
    1k Views
    L
    @JonB I've been trying for 2 days but I couldn't get it to work: main.cpp int main(int argc, char *argv[]) { SingleApplication application( argc, argv, true); mainWindow = new MainWindow(); if (application.isSecondary()) { if (application.arguments().count() == 2) { application.sendMessage( argv[1] ); } return 0; } else { QObject::connect(&application, &SingleApplication::receivedMessage, mainWindow , &MainWindow::slotReceivedMessage); } mainwindow.cpp namespace Win32 { #include "Windows.h" } #define BUFSIZE 4096 void MainWindow::slotReceivedMessage(int instanceId, QByteArray message) { Win32::DWORD retval=0; Win32::BOOL success; Win32::TCHAR buffer[BUFSIZE]; Win32::TCHAR buf[BUFSIZE]; Win32::TCHAR** lppPart={NULL}; // convert char * to wchar_t * const size_t WCHARBUF = 100; wchar_t message_t[WCHARBUF]; Win32::MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, message, -1, message_t, WCHARBUF); // get full filename from short filename retval = Win32::GetFullPathName(message_t, BUFSIZE, buffer, lppPart); QString filePath = QString::fromWCharArray(buffer); qDebug() << message; qDebug() << filePath; } Since GetFullPathName needs a wchar_t as input, I have to first convert the char to wchar_t, then convert it to full path name. But when printing out with debug, both the input(message) and output(filePath) are still the same. The GetFullPathName wasn't doing anything. What am I doing wrong?
  • Error "Target xxx.obj does not exist" in pri

    Solved
    8
    0 Votes
    8 Posts
    711 Views
    Andy314A
    @Andy314 I tested a lot over hours to find out whats the problem. Creation of a new projekt or folder projekts gave the same error. Files with old filenames worked, new filenames worked no. The after some changing of "set xxx als active projekt" the Creator tried to compile (or was it reversed) a Cpp file with Python. This gave the hint that with the Creator is something wrong, the active project (resp. the file project relation) was no accepted correctly. Creating of a new workspace and integration my old project solved the problem. There must be a bug in the Creator.
  • QMainWindow: how to get a mouseReleaseEvent after resizing?

    Unsolved qmainwindow resizeevent
    4
    0 Votes
    4 Posts
    2k Views
    JonBJ
    @BwvB I don't know whether installing an eventFilter somewhere would see the mouse release. But I don't see the solutions mentioning that.
  • QProcess startDetached() run ps1 script

    Solved qprocess startdetached ps1 powershell script
    8
    0 Votes
    8 Posts
    2k Views
    P
    @SGaist Great idea! I change the code and everything should work. I close the topic and if I encounter any other problems I will create a new one. @SGaist , @JoeCFD Thank you for your help!
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    7 Views
  • How to show WiFi connections?

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    S
    @jsulm I finally use a this code. Program in Windows and Raspberry PI do not show any things but in Ubuntu work! http://www.mediafire.com/file/7jrm90s1vsrs5m2/WiFi.rar/file
  • How to set QScatterSeries axis to draw between them?

    Unsolved
    5
    0 Votes
    5 Posts
    499 Views
    M.H.HM
    @JoeCFD Yes, it works. But it is not what I mentioned. To see my point try to add X-axis and Y-axis range wider than the point values.
  • QLineEdit: render whitespaces

    Unsolved
    6
    0 Votes
    6 Posts
    982 Views
    mrjjM
    @JonB Hi Yeah I missed first-time that user would also paste their credentials and to catch that one has to catch the context menu AND ctrl+v (or similar) and also prevent pressing space at the beginning. So we want them to be able to type spaces if in the middle of the user name but not in the front/end so I think calling trimmed before login will do the trick unless i missed something more :)
  • 0 Votes
    2 Posts
    596 Views
    JonBJ
    @Lian-ZhiYang As the error message invites you to do: "Press Retry to debug application". Whichever button that is, press it. Hopefully you will be taken into Visual Studio where you can view the stack trace to see if this emanates from a line in your code.
  • QNetworkAccessManger get data

    Solved qt 6.0.1 c++ mingw
    4
    0 Votes
    4 Posts
    840 Views
    E
    @jsulm Yoo,thanks bro
  • cannot find bluetooth module - again

    Unsolved
    6
    0 Votes
    6 Posts
    700 Views
    A
    @JKSH said in cannot find bluetooth module - again: @AnneRanch said in cannot find bluetooth module - again: Looks like using Bluetooth in Qt 6 is risky. ... I guess I will start fresh with Qt6 and see what develops. Qt Bluetooth is not yet available in Qt 6: https://www.qt.io/blog/add-on-support-in-qt-6.0-and-beyond Stick with Qt 5 if you want to use Bluetooth. Qt Creator 4.14.1 Based on Qt 5.15.2 (GCC 7.3.1 20180303 (Red Hat 7.3.1-5), 64 bit) This information tells us which version of Qt was used to build Qt Creator. It is not the version of Qt you use to build you own projects. That is determined by the kit(s) that you select for your project. OK This is my current still running / limping but no bluetooth . Unless I read it wrong - the current version of Qt Creator is 6.0.2 and it supposedly has bluetooth fixed. Can anybody confirm that for me ? I do not need another "do not run 6 if you want bluetooth advisory" , just confirm this post yes or no for each item, please. [image: a6df8ac9-edff-41cf-b8c5-30f92105da00.png] It looks there is NO online installer for 6.0.2 https://www.qt.io/offline-installers Also if I am running 6.0,.1 it never updates to 6.0.2. [image: 9ff87004-ee91-4a91-b240-ce8b0dc92cc0.png] BTW If these versions are so important it would be nice if the numbers show in ONE PLACE - likes "system status" .
  • Multiple windows application with Qt-Widgets/Designer- best method

    Solved
    4
    0 Votes
    4 Posts
    785 Views
    S
    I thing the "Main Window" example gives me a good start on this. I'll start there.