Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • My app only displays the exit button:(

    Moved Unsolved
    11
    0 Votes
    11 Posts
    790 Views
    Pl45m4P
    @NewBieBoy said in My app only displays the exit button:(: My next problem is that how can I export it to executable file, I have never tried it before😕 Just check your "build" folder... how it's named, where it's located and other things depend on your settings. Every time you start your program in QtCreator, it builds/compiles your code and executes it. The executable should be in your project directory in build/Debug or build/Release or whatever config. you are currently running. To use it stand-alone (I guess that's what you thought of) you have to deploy it properly Therefore check: https://doc.qt.io/qt-6/deployment.html https://doc.qt.io/qt-6/windows-deployment.html https://wiki.qt.io/Deploy_an_Application_on_Windows
  • QT Linguist tool not picking up right translation

    Moved Unsolved qt 5 translation
    4
    0 Votes
    4 Posts
    669 Views
    Christian EhrlicherC
    @TechieTab said in QT Linguist tool not picking up right translation: How to adjust QT accordingly? I don't know why you want to adjust Qt here. The ts-file needs to be UTF-8 so fix your script, Latin1 can not be used here - Отказ can not be displayed with the latin1-charset so I doubt you're using latin1 at all...
  • QRegExp rx("[((X|Y|x|y)\\d{0,3}(\\.\\d+)?\\S$)]{0,1}");

    Solved
    16
    0 Votes
    16 Posts
    1k Views
    gfxxG
    @JonB verified .... these is ok for me. thanks a lot
  • Download error :

    Unsolved
    1
    0 Votes
    1 Posts
    120 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • FreeQt Licence

    6
    0 Votes
    6 Posts
    2k Views
    L
    Download https://download.qt.io/archive/qt/1/qt-1.41.tar.gz and decompress, I think the LICENSE file is the file, which is before QPL. See also https://invent.kde.org/historical/qt1/-/blob/master/LICENSE .
  • Adding a QMenuBar to a ui...

    Solved
    6
    0 Votes
    6 Posts
    451 Views
    SPlattenS
    @jsulm Doh! Of course!, you are correct and it does work, I wasn't looking for it there.
  • QML model updating without binding loops / correct behavior

    Unsolved
    1
    0 Votes
    1 Posts
    225 Views
    No one has replied
  • 1 Votes
    1 Posts
    592 Views
    No one has replied
  • Implementing Individual Y-Axis Zoom on Multi-Axis QChart - Need Help with Axis Position

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    JonBJ
    @akikaede It may mean that. The first thing to do is to try to understand how it achieves the drawing of these items. From that code you might be able to see how you could achieve your goal. It might require using internal calls which are not exposed, or you might see a way to get at what you need without them. We are not saying this is either desirable or easy, but it may be the only way. If you are lucky someone will tell you how you can do what you want, but if you are not getting a further response that may indicate nobody knows or it cannot be done, and you are on your own. I will mention that by common consent Qt Charts is perhaps not the nicest piece of code. There are other third-party chart drawing offerings for Qt (e.g. I believe Qwt). They might allow what you seek, or they might be worse.
  • Need to understand setUpdatesEnabled behaviour while updating UI elements

    Solved
    4
    0 Votes
    4 Posts
    606 Views
    jsulmJ
    @starkm42 If you want to do something periodically then use QTimer.
  • screenshot

    Locked Unsolved
    4
    0 Votes
    4 Posts
    513 Views
    jeremy_kJ
    This is a duplicate of https://forum.qt.io/topic/151920/screenshot/2?_=1699508498491 Please stick to a single thread.
  • Gstreamer with Qtwidgets

    Unsolved
    5
    0 Votes
    5 Posts
    850 Views
    N
    void GstPlayer::setVideoOutput(QWidget *widget) { _hwndVideo = widget->winId(); } gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(customData.pipeline), _player->hwndVideo());
  • Question Regarding QVector Behavior

    Unsolved
    5
    0 Votes
    5 Posts
    406 Views
    Christian EhrlicherC
    Simply iterate over the vector and add the ones which could not be copied to another vector which you can process later on.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • QMetaType alias in Qt6

    Unsolved metatype qt5 qt6
    8
    0 Votes
    8 Posts
    2k Views
    T
    @crueegg Hi, unfortunately, we had to cope with the same issue. The only way to circumvent it was to create a singleton class that handles a mapping between the id of the QMetaType and the custom alias. See https://gitlab.inria.fr/dtk/dtk-core/-/issues/30 for more details. Thib.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Qt Ethernet communication

    Unsolved
    21
    0 Votes
    21 Posts
    11k Views
    C
    Read the "good reply" by Hugh-P, or adapt from the earlier reply by kuzulis
  • How to program a floating (touch) spinbox with qwidget

    Unsolved
    3
    0 Votes
    3 Posts
    292 Views
    R
    @SGaist Thank you for your reply! The wheel control (if it is the top right widget, what i will check later on) looks promising. To switch to qml is sadly not an option for me. Thank you once again for sharing that site.
  • Can't set a button to a certain position by only using code

    Solved
    3
    0 Votes
    3 Posts
    403 Views
    C
    @thatbeatrice QLayoutItem::setAlignment() tells the layout item (widget or QLayoutItem subclass) where to put itself inside the space given to it by its parent layout. The middle layout is given the entire client area of the widget containing this code to manage. You are not putting your top or bottom layout items into a layout, so their position is entirely up to you to manage (and you are not). These are two different options #include <QApplication> #include <QWidget> #include <QLabel> #include <QVBoxLayout> #include <QGridLayout> int main(int argc, char **argv) { QApplication app(argc, argv); QWidget w; QLabel *top = new QLabel("Top Left", &w); QLabel *mid = new QLabel("Middle right", &w); QLabel *bot = new QLabel("Bottom right", &w); #if 1 // Option 1 QVBoxLayout *layout = new QVBoxLayout(&w); top->setAlignment(Qt::AlignLeft | Qt::AlignTop); mid->setAlignment(Qt::AlignCenter); bot->setAlignment(Qt::AlignLeft | Qt::AlignBottom); layout->addWidget(top); layout->addWidget(mid); layout->addWidget(bot); #else // Option 2 QGridLayout *layout = new QGridLayout(&w); layout->addWidget(top, 0, 0, Qt::AlignLeft | Qt::AlignTop); layout->addWidget(mid, 1, 1, Qt::AlignCenter); layout->addWidget(bot, 2, 0, Qt::AlignLeft | Qt::AlignBottom); #endif w.resize(800, 600); w.show(); return app.exec(); } Whether you want to use the code that Designer and uic produce, it can be very informative to see how it constructs things.