Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.3k Posts
  • connection QPushButton and QWidget for QTabWidget

    Unsolved
    3
    0 Votes
    3 Posts
    213 Views
    O
    Thnak you
  • How to grab events of QCheckbox inside a QWidget ?

    Unsolved
    4
    0 Votes
    4 Posts
    436 Views
    artwawA
    @FCastle Well, good luck then!
  • Should I use Classes to conserve memory for Android deployment ?

    Unsolved
    10
    0 Votes
    10 Posts
    559 Views
    J.HilkJ
    @Citabria said in Should I use Classes to conserve memory for Android deployment ?: My program won’t compile because of the “unused variable” bob. ”Velocity* Bob = new Velocity();“ No. Unless, you order your compiler to tread warnings as errors (with the compiler option/argument -Werror) I would applaud you, if you use this, but its not default and people like to ignore warnings, so 99% of all c++ programmers won't have it on. 😔 Can you post the actual compiler error message ? If you posted it before, I can't see it. Are you sure you included the header of "Velocity" class in mainwindow ?
  • How is proper way to catch mouse release outside app?

    Solved
    2
    0 Votes
    2 Posts
    226 Views
    kshegunovK
    That's because your application doesn't get the events due to the release being outside of its supposed scope. Now, it's possible to capture them exclusively with QWidget::grabMouse, but the usual warnings apply. Make sure you don't have bugs in that code, as it's rather easy to kill the usability of the system by not releasing the mouse ... Note: Also there are platform differences, so check the documentation out. Note 2: You could try to respond sensibly to the mouse leave event as an alternative.
  • QTableWidget or QTableView - Presenting many info in one table cell

    Unsolved
    6
    0 Votes
    6 Posts
    539 Views
    gde23G
    For the layout on the delegate you can use a grid layout or cascaded horizontal/vertical layouts, that really does not matter. However, if you are not familiar with basic widget layouts I would suggest starting with something more basic than delegates. E.g. you can first setup the model/view, then make a standalone widget to be used as delegate, and finally setup the delegate.
  • Crash on QBluetoothDeviceDiscoveryAgent start method on W7

    Unsolved
    4
    0 Votes
    4 Posts
    421 Views
    A
    Did you find a solution / workaround for this issue? I am experiencing the same issue. I realized that it is somehow related to CPU stress, however, could not find a solution yet. Any hint would be appreciated, thanks.
  • How to step into the Qt source code (Qt 5.15.2 / Windows) ?

    Solved
    10
    0 Votes
    10 Posts
    3k Views
    AlveinA
    @Bonnie That made it. I just needed the c:/users/qt/work/qt target, though. And no CDB paths at all. I'm pretty sure I used the Add Qt sources button before, but ATM, IDK (and IDC) about what happened. Thank you very much! I've been on this for a long while.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • Open source ....

    Unsolved
    2
    0 Votes
    2 Posts
    278 Views
    JKSHJ
    @AnneRanch said in Open source ....: Could somebody with experience analyzing Qt Open source code help me to find actual code for "code formatter / beautifier " . At least give me some pointers where to start looking - github link ? Is https://github.com/qt/qtbase good place to start ?. The Beautifier is in Qt Creator IDE. qtbase contains Qt libraries, not the Qt Creator IDE. https://github.com/qt-creator/qt-creator/tree/master/src/plugins/beautifier yes I have asked this before AND GOT NOWHERE. You can add a link to your original post here.
  • How to set background color of my QTextEdit?

    Unsolved
    3
    0 Votes
    3 Posts
    3k Views
    mrjjM
    Hi It has to be the right role. QWidget::backgroundRole() is not used it seems. Try QPalette p = ui->textEdit->palette(); p.setColor(QPalette::Base, Qt::red); // BG p.setColor(QPalette::Text, Qt::white); // (plain) TEXT ui->textEdit->setPalette(p); [image: 1byfHV.png]
  • Unclear sceneRect behavior when scaling QGraphicsView

    Unsolved
    1
    0 Votes
    1 Posts
    101 Views
    No one has replied
  • Deleting object after QQmlEngine quit. How?

    Solved
    4
    0 Votes
    4 Posts
    479 Views
    sierdzioS
    Yeah, this started appearing a few versions ago, around 5.13 or 5.14. I think some bug fix must have changed QQmlEngine destructor or something. In every case I noticed these TypeError logs, it was enough to change parenting or initialization order to fix the issue.
  • Can't save an image from a QLabel to disc

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    SGaistS
    Use the selectedFilter output parameter to get the information.
  • How to set fixed width in qtextdocument?

    Unsolved
    4
    0 Votes
    4 Posts
    639 Views
    raven-worxR
    @qwe3 try https://doc.qt.io/qt-5/qtextdocument.html#textWidth-prop
  • CMAKE_MAKE_PROGRAM is not set.

    Unsolved
    2
    0 Votes
    2 Posts
    4k Views
    JoeCFDJ
    @Flaviu-0 said in CMAKE_MAKE_PROGRAM is not set.: CMake Error: CMake was unable to find a build program corresponding to "Ninja" Your problem is not qt related. https://ninja-build.org/manual.html cmake uses ninja in your case. Try to install ninja and you will be all right.
  • Proper resetting the transformation

    Solved
    4
    0 Votes
    4 Posts
    474 Views
    JoeCFDJ
    @jan-tosovsky after resize event, the image position has to be adjusted for center alignment. Otherwise, its position will not change.
  • qt.qpa.xcb: could not connect to display error

    Unsolved
    22
    0 Votes
    22 Posts
    23k Views
    D
    @jsulm yes you did but my problem is not about deploying. I cannot run my project on qt creator
  • How to use Qt translation resources?

    Solved
    2
    0 Votes
    2 Posts
    1k Views
    B
    Actually the usual way is just deploying the translation files with the executable file. When you use windeployqt tool on Windows, some translation files will be copied just like the plugins by default. If you want to add them to the resource it is also possible. I think you can't use MACROs in qrc file. But you can use them in the .pro file and let it generate a qrc file for you. qm_file.files = $$[QT_INSTALL_TRANSLATIONS]/qtbase_bg.qm #can be multiple files qm_file.base = $$[QT_INSTALL_TRANSLATIONS] #add relative alias automatically qm_file.prefix = i18n RESOURCES += qm_file This will generate a qrc file qmake_qm_file.qrc in the build folder and add it to the Makefile. Then you would be able to access the file by :/i18n/qtbase_bg.qm.
  • Cannot see the Build & Run panel in my QtCreator

    Solved
    4
    0 Votes
    4 Posts
    254 Views
    K
    The Build & Run pages magically appeared again. Must have been something wrong with the kits afterall.
  • This topic is deleted!

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