Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • How to resize the widgets inside QDialog window when user resize QDialog manually.

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    jsulmJ
    @Ayush-Gupta said in How to resize the widgets inside QDialog window when user resize QDialog manually.: No i did not applied to layout to the dialog Then please do...
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Add QChartView to Qt Desiner like custom widget

    Solved
    3
    0 Votes
    3 Posts
    4k Views
    S
    Thanks, it works!
  • NoPositioningMethods with PositionSource on windows 10 desktop?

    Unsolved
    1
    0 Votes
    1 Posts
    126 Views
    No one has replied
  • replace a word in all line of a big txt file

    Unsolved
    11
    0 Votes
    11 Posts
    2k Views
    S
    @Christian-Ehrlicher im want to replace a folder name from user pc in txt, and maybe the folder name contain some Unicode character... so its better to use qstring and about Mixing QString and QByteArray, it was a mistake Correct, I was aware of this but first the basics and not a simple 'I don't know and please write code for me' :) And one other thing, i never said to write this code for me :| , i just said do you have any example code for me, so i can learn from it... anyway thanks for help
  • QT Modbus Master Slave Example Issue

    Unsolved
    1
    0 Votes
    1 Posts
    499 Views
    No one has replied
  • Random crash during setup(ui), retranslante step

    Unsolved
    24
    1 Votes
    24 Posts
    3k Views
    Christian EhrlicherC
    I would guess that there are a lot of 'dangling' widgets around due to re-creation of them during retranslate()
  • QGroupBox issues

    Solved
    3
    0 Votes
    3 Posts
    259 Views
    I
    @JonB Thank you so much.
  • Creating a QMainWindow in _tWinMain()

    Unsolved
    2
    0 Votes
    2 Posts
    228 Views
    PerdrixP
    Well, I tried it: DeepSkyStacker mainWindow; if (!fileListName.isEmpty()) { ZTRACE_RUNTIME("Set Starting File List"); mainWindow.setFileListName(fileListName); ZTRACE_RUNTIME("Set Starting File List - ok"); } mainWindow.show(); ZTRACE_RUNTIME("Creating Main Window - ok"); try { ZTRACE_RUNTIME("Invoking Run() "); theApp.Run(); // dlg.DoModal(); } The main window opened just fine, but when I closed it, theApp.Run() didn't return as it didn't return from QMfcApp.Run(). BOOL CDeepSkyStackerApp::Run() { ZFUNCTRACE_RUNTIME(); const int result = QMfcApp::run(this); delete qApp; return result; } If I use "Break All" in the debugger at this point the call stack looks like: [image: 491ed762-5376-4cc5-ae9c-4bb560273040.png] What am I doing wrong? Thanks David
  • error executing the *.exe file

    Unsolved
    3
    0 Votes
    3 Posts
    300 Views
    VRoninV
    You need to deploy it, windeployqt is all you need really: https://doc.qt.io/qt-5/windows-deployment.html#the-windows-deployment-tool
  • Promoted custum QWidget preview in the UI Editor

    Solved
    3
    0 Votes
    3 Posts
    264 Views
    CP71C
    @Bonnie Thanks very much. I don't know this way, you are right, it is not convenient… but could be interesting in some occasion. Thanks CP71
  • What is QThread::loopLevel()?

    Unsolved
    2
    0 Votes
    2 Posts
    673 Views
    VRoninV
    Returns the number of event loops running in that thread. QThread::exec() spawns an event loop, if you then create other QEventLoops in this thread and exec() them then this count will increase
  • can`t get webassembly working - please help

    Unsolved
    4
    0 Votes
    4 Posts
    371 Views
    Pablo J. RoginaP
    @nirs said in can`t get webassembly working - please help: followed emscripten installation instruction which one? Have you also checked this wiki page?
  • Mental difficulty understanding what is wrong...

    Solved
    15
    0 Votes
    15 Posts
    1k Views
    Pablo J. RoginaP
    @SPlatten said in Mental difficulty understanding what is wrong...: All sorted now ! great, so please don't forget to mark your post as solved!
  • Display items horizontally in QTreeView

    Unsolved
    1
    0 Votes
    1 Posts
    182 Views
    No one has replied
  • Qt Concurrent Map with different size of return sequence compared to input sequence.

    Unsolved
    3
    0 Votes
    3 Posts
    296 Views
    CJhaC
    @VRonin Thanks! Yes, my compiler supports C++17, I will try this method.
  • MVSC created dll crashes in Qt

    Unsolved
    6
    0 Votes
    6 Posts
    664 Views
    JKSHJ
    @Near-River said in MVSC created dll crashes in Qt: In the Visual studio .dll it I implemented it like this: #ifdef __cplusplus extern "C" { #endif __declspec(dllexport) Base* testfunction() { return new Child(); #ifdef __cplusplus } #endif You can use this in Qt too. Qt is a C++ library, so you can use any C++ code in Qt. I do not want to make big changes now like moving to newer version if it takes like rewriting some parts of the project because the deadline is in 13 days so I stay at this version for now I think. OK, that makes sense. Good luck with your project. Solution found: I am happy to say that it works now as I used Qt Creator to make the .dll file, so the problem was the compiler difference that is confirmed. Thank you so much for your suggestions and help, if you have any further recommendations I appreciate them aswell. Great! I already have my project 3/4 done in the actual version (Qt 4.11.0). Qt 4.11 does not exist. The last version of Qt 4 was Qt 4.8. I think you meant Qt Creator 4.11. Note: Qt Creator is an IDE (Integrated Development Environment). You use it to manage and build C++ projects Qt is a C++ library.
  • QWidget stylesheet rules

    Solved
    12
    0 Votes
    12 Posts
    2k Views
    CP71C
    Thanks @JonB I have a empty project with following items [image: b652c3a3-afe3-4c9d-be3e-780a3d65c7f6.png] My FormTop is [image: c7ad7f37-093c-4a26-812c-d7622586c623.png] In CSS I must change target for style from FormTop to WidgetFormTop. So to link to my latest post, the following code works well. WidgetFormTop QWidget{ background-color: #FFFFFF; color: #000000; } Instead the following code doesn’t work, or it seems so: WidgetFormTop#FormTop{ background-color: #FFFFFF; color: #000000; } For me, the objectName you can set via UI editor (objectName property) or via code by setObjectName(); In fact, I reached up my goal only partially. I really wanted to set properties of “FormTop” but I can’t if I write “FormTop” in CSS. But I can do indirectly writing “WidgetFormTop” in CSS . Why? I’don’t know. Remember, I call setStyleSheet of MainFrame in main.cpp.
  • parse json response body which is also json object

    Solved
    9
    0 Votes
    9 Posts
    1k Views
    T
    QI declare new QString with reply.value('body') and convert it to Qjsondocument again and it works. But @VRonin your solution is much more simple and reasonable. thank you :) QJsonArray bodyArray = QJsonDocument::fromJson(reply.value("body").toString().toUtf8()).array(); @JonB I don't know why but AWS lambda and API Gateway connection requires body part in only json
  • nRF connect dongle with Qt for windows

    Unsolved
    2
    0 Votes
    2 Posts
    433 Views
    R
    Hi @martial123, I have the same setup as you and I'm looking to use my nRf52 as a master in my Qt application. Have you found a solution to your problem ? thanks, Raphael