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 remove this effect?

    Solved
    6
    0 Votes
    6 Posts
    597 Views
    raven-worxR
    @Emon-Haque i dont see an additional gap. you may want to read this: https://doc.qt.io/qt-5/coordsys.html
  • Why does QPainter::boundingRect returns 0 0?

    Solved
    3
    0 Votes
    3 Posts
    492 Views
    D
    @mpergand, yes now I get 192 16 148 32.
  • cURL - The program has unexpectedly finished. Crash!

    Unsolved
    10
    0 Votes
    10 Posts
    1k Views
    D
    @Hayden-Harber Did you get any solution for this. i have encountered the same problem like this.
  • Why the pointer of QVector always change when use QVector as parameter of signal?

    Unsolved
    7
    0 Votes
    7 Posts
    574 Views
    MozzieM
    @jsulm Thank you very much!
  • using qlineedit to read in a string

    Solved
    2
    0 Votes
    2 Posts
    436 Views
    jsulmJ
    @pgiovanni said in using qlineedit to read in a string: connect(*readInMBTI, readInMBTI->textChanged(*MBTItype), this, nextStep(MBTItype->toStdString())); This is wrong. Please take a look at https://doc.qt.io/qt-5/qlineedit.html#textChanged What parameter does it have? Hint: it is not *MBTItype. So, fix your slot (put correct parameter there) and the connect call. Also, you can't call anything when doing a connect, I'm referring to this: nextStep(MBTItype->toStdString()) connect() only connects a signal to a slot, nothing more. You also should use new Qt5 connect syntax: https://doc.qt.io/qt-5/signalsandslots.html
  • copying byte to Qstring

    Unsolved
    4
    0 Votes
    4 Posts
    416 Views
    jsulmJ
    @seok said in copying byte to Qstring: error says i cannot copy a connst char * to QString Of course, strcpy has no idea what QString is (check its signature). Why do you want to use strcpy in a C++ Qt application? You can use https://doc.qt.io/qt-5/qstring.html#append-1 instead. str.append(QChar(arr[i][j]));
  • QHBoxLayout background is not transparent, its white

    Solved
    4
    0 Votes
    4 Posts
    1k Views
    L
    @JoeCFD actually what i did was to move everything inside a frame, with stylesheet and set the background to transparent and the border to 0 Px, that did the trick
  • Table widget with different column widths per row?

    Solved
    9
    0 Votes
    9 Posts
    798 Views
    P
    @JonB OK, I've found that it works thanks.
  • loading data from database using another thread

    Solved
    21
    0 Votes
    21 Posts
    3k Views
    P
    @Christian-Ehrlicher and @KroMignon i did it successfully Thanks you so much your opinions helped me to fix the Big O problem too now it's only calculation with the other thread <3
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Beginner : getting the output of a Widget once closed ?

    Solved
    6
    0 Votes
    6 Posts
    592 Views
    SGaistS
    @DonutMan said in Beginner : getting the output of a Widget once closed ?: I was a bit surprised that these objects are still available once the self.close() is called. I somehow expected that the object will be destroyed just after being closed... Unless you set the deleteOnClose properly, they should not. Note that the Qt parent child system does not forbid you to do same memory handling. A child will live as long as it parent so if you create a lot of dialogs all the time without cleaning them, they will still eat your memory.
  • How to style a table in QTextEdit

    Solved
    30
    0 Votes
    30 Posts
    7k Views
    H
    @SGaist This was the right solution! Thank you so much!
  • QAxObject and Excel

    Unsolved
    29
    0 Votes
    29 Posts
    13k Views
    K
    @JonB, the query is actually irrelevant, I just need to get the cell's address. I have an application that validates columns and lists cells that have wrong values. The validation result is the address and a failure message so the user knows exactly where the error occurs and what has to be fixed directly in a checked file. SQL/ODBC queries compare columns faster than QAxObjects, but results lack addresses. The addresses don't have to be in an Excel manner like A12 etc., it can be a row/column number from the sheet.
  • Why emitting signal can cause a segmentation fault?

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    JonBJ
    @CuriousPan Need to emphsize what @mchinand has written: you need to look around the debugger's windows/panes till you find the Stack Trace one. It shows which functions were calling which when the crash happened. Look back up till you find it's telling you a line in your code, look at that.
  • How to build Qt with clang under windows?

    Unsolved clang building qt qt 5.15
    4
    0 Votes
    4 Posts
    1k Views
    Christian EhrlicherC
    @Crazy-Sage said in How to build Qt with clang under windows?: Clang 7.0.0 And you're sure this ancient compiler supports all MSVC commands when you use clang-cl. What do you think you will gain when you compile Qt with clang-cl at all?
  • QDial doesn't stop at end point issue

    Unsolved
    7
    0 Votes
    7 Posts
    574 Views
    Christian EhrlicherC
    @Eric-Singer said in QDial doesn't stop at end point issue: This should be corrected in a future release, at least by option. I don't have this problem but also don't have https://doc.qt.io/qt-5/qdial.html#wrapping-prop set to true. Please provide a minimal, compilable example where you can show your issue.
  • Is it safe to call QThread::start() many times?

    Solved
    5
    0 Votes
    5 Posts
    519 Views
    Pl45m4P
    @qwe3 said in Is it safe to call QThread::start() many times?: if(QThread::currentThread()->isInterruptionRequested()) { return; } Looks good. https://doc.qt.io/qt-5/qthread.html#isInterruptionRequested
  • Build Qt6 from Conan Center

    Unsolved
    1
    0 Votes
    1 Posts
    218 Views
    No one has replied
  • SQLite integration with Qt Widgets

    Unsolved
    3
    0 Votes
    3 Posts
    485 Views
    Pl45m4P
    @Swati777999 To extend @JonB answer: Depends on what you really want to display and how your data / database looks like. If you have a single and more or less simple database table, have a look at QSqlTableModel https://doc.qt.io/qt-5/qsqltablemodel.html#details or even QSqlQueryModel, for even more simple, read-only SQL database access queries. https://doc.qt.io/qt-5/qsqlquerymodel.html#details For anything further than that, you probably need to write your own database model + view (to change/insert data using your graphical representation of your data).
  • Change border color on primitive element

    Unsolved
    1
    0 Votes
    1 Posts
    121 Views
    No one has replied