Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.3k Posts
  • RESTFul Server in qt

    Unsolved
    2
    0 Votes
    2 Posts
    191 Views
    raven-worxR
    @satyanarayana143 Cutelyst or if you can wait: https://www.qt.io/blog/2019/01/25/introducing-qt-http-server
  • Q3DSurface & QEntity

    Unsolved
    1
    0 Votes
    1 Posts
    169 Views
    No one has replied
  • How to efficiently create a QList with a single item in one statement?

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    A
    OK, I simplified the problem too much. I do not have a constant value for initialization, but an argument: void addToHash(const int key, const int value) { if (m_Hash.contains(key)) { m_Hash[key].append(value); } else { m_Hash.insert(key,QList<int>{value}); } } Here, the initializer list causes a compiler error: 'initializing': cannot convert from 'initializer list' to 'QList<int>' EDIT: And here I circumvent my original problem: void addToHash(const int key, const int value) { m_Hash[key].append(value); } ...since operator[] default-constructs an entry if none exists.
  • QFileDialog sidebar on target device not visible

    Unsolved
    1
    0 Votes
    1 Posts
    399 Views
    No one has replied
  • sqldrivers: PostgreSQL not found (Win10, Qt5.12.3, MSVC2017, Postgres 9.6.7)

    Unsolved
    2
    0 Votes
    2 Posts
    255 Views
    Z
    It seems i do already have the drivers shipped with the binary release of QT, as i found them in /plugins/sqldrivers: qsqlite.dll qsqlited.dll qsqlmysql.dll qsqlmysqld.dll qsqlodbc.dll qsqlodbcd.dll qsqlpsql.dll qsqlpsqld.dll Even as the documentation tells me otherwise: "Due to the practicalities of dealing with external dependencies, only the SQLite3 plugin is shipped with binary builds of Qt. To be able to add additional drivers to the Qt installation without re-building all of Qt, it is possible to configure and build the qtbase/src/plugins/sqldrivers directory outside of a full Qt build directory. Note that it is not possible to configure each driver separately, only all of them at once. Drivers can be built separately, though. If the Qt build is configured with -prefix, it is necessary to install the plugins after building them, too. For example:" So i don't need to build them anymore. Even if the problem itself is not solved (the same with the inital thread). Maybe i should not read the documentation first ;)
  • How to pre-process QCamera frames using OpenCV before displaying on QCameraViewfinder

    Unsolved
    10
    0 Votes
    10 Posts
    4k Views
    M
    @mikeitexpert thanks mike, can you share please the: #include <utils/settings.h> #include <utils/utils.h> ?
  • Conversion from QFlags<> to QVariant could be easier

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    R
    @chris-kawa Thank you.
  • QT BLE and windows discovering without pairing with device manager

    Solved
    3
    0 Votes
    3 Posts
    360 Views
    Pham HoangP
    my outdate. ^^!. i see. thank @J-Hilk
  • QComboBox LineEdit crashing

    Solved
    3
    0 Votes
    3 Posts
    667 Views
    R
    @jonb Hello. Thanks for the response. I ended up making the combo boxes editable in QtCreator and then doing this: ui->cmbTest->lineEdit()->setReadOnly(true); ui->cmbTest->lineEdit()->setAlignment(Qt::AlignHCenter); Regards.
  • 0 Votes
    10 Posts
    3k Views
    mrjjM
    @rasden-mtz Hi Just guessing: the wiringPiISR expects a callback that is a plain free global function. ( a nonmember function) and you give it a function that lives in MainWindow so it complains that it has to be a static one (as that is like a global one since it requires no object instance to invoke methods) so make it static or simply use a nonmember function. so it has to be like @ambershark shows.
  • 0 Votes
    2 Posts
    183 Views
    aha_1980A
    @canid why do you need it in the close button slot at all? As you noticed, it is called in the close event. Regards
  • Custom context menu on disabeld widget... ?

    Unsolved
    3
    0 Votes
    3 Posts
    782 Views
    S
    event() is a vfun, so you also can do that: bool PushButton::event(QEvent *event) { if (event->type() == QEvent::MouseButtonRelease) { QMouseEvent* e = static_cast<QMouseEvent*>(event); if (e->button() == Qt::RightButton) { // Do what you want QMenu* menu = new QMenu(this); menu->addAction("d1"); menu->addAction("d2"); menu->addAction("d3"); menu->exec(e->globalPos()); return true; } } return QPushButton::event(event); }
  • Scroll Area Refuses To Work

    Solved
    3
    0 Votes
    3 Posts
    306 Views
    A
    @sgaist Thank you for the reply. To clarify, the Scroll Area aromatically comes with a QWidget child in Designer, so I have always been putting my layout in said QWidget. Looks just like this: Scroll Area -> Widget -> Grid Layout -> Stuff (Note: Scroll Area has no other children) After trying many things, simply changing the min size limits of the inner QWidget finally fixed it.
  • QGraphicsView&Scene Printer Error.

    Unsolved
    1
    0 Votes
    1 Posts
    120 Views
    No one has replied
  • Where do write about Qt Creator bugs?

    Solved
    4
    0 Votes
    4 Posts
    277 Views
    Pablo J. RoginaP
    @bogong you're welcome. If your issue is solved, please mark your post as such. Thanks.
  • insert text with css style into QTextEdit

    Unsolved qtextedit grid table
    8
    0 Votes
    8 Posts
    5k Views
    R
    @jonb Yes, that is the document to which I was referring. Thank you for posting the link!
  • Build for all kits by one button. How?

    Unsolved
    2
    0 Votes
    2 Posts
    172 Views
    aha_1980A
    how is that question different to https://forum.qt.io/topic/106176/run-build-for-all-platforms-at-once-how which you asked two weeks ago?
  • TLS initialization failed

    Solved
    6
    0 Votes
    6 Posts
    593 Views
    M
    Something happened and earned itself
  • Cross-platform Qt data visualization apps really possible?

    Solved
    7
    0 Votes
    7 Posts
    749 Views
    Tom assoT
    I upgraded my ubuntu host to 18.04.2 - now Qt Quick data visualization examples run on ubuntu as well as Android without error. @skycrestway - thank you for providing the "existence proof" of this cross-platform capability!
  • Sharing data between static library and main executable program

    Unsolved
    3
    0 Votes
    3 Posts
    219 Views
    fcarneyF
    Shouldn't this work? extern int somevariable;