Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • 0 Votes
    2 Posts
    624 Views
    C
    To hide the row and column header row entirely: tableWidget->horizontalHeader()->setVisible(false); tableWidget->verticalHeader()->setVisible(false);
  • Detect when webcam is unplugged

    Unsolved
    13
    0 Votes
    13 Posts
    5k Views
    JoeCFDJ
    @mayamail Works? Nice! What is your Qt version? And the class QCameraViewfinder does not exist any more in Qt6.
  • This topic is deleted!

    Unsolved
    16
    0 Votes
    16 Posts
    118 Views
  • 0 Votes
    4 Posts
    281 Views
    JonBJ
    @jdent Yes, good start. Will produce a read-only model. The reference states all the methods you need to override. In data() you must test role and only return yours on Display/EditRole. Else an invalid variant, QVariant() or call base methodQAbstractTableModel::data(index, role). And if you are going to have 14 columns you need to provide that data and take index.column() into account in data(). If you really only want a model of a vector of something then columns needs to return 1. QAbstractListModel Class would then save you implementing most stuff. There is some inconsistency: if you want a QTableView not a QListView then presumably your model actual contains more data (columns) than just a vector. Which do you want?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    2 Posts
    290 Views
    M
    @jdent like the signal onCurrentItemChanged(QTableWidgetItem *current, QTableWidgetItem *previous)
  • This topic is deleted!

    Solved
    3
    0 Votes
    3 Posts
    37 Views
  • Using QTcpSocket from multiple threads (Locking/Synchronous approach)

    Solved
    8
    0 Votes
    8 Posts
    854 Views
    N
    @Christian-Ehrlicher said in Using QTcpSocket from multiple threads (Locking/Synchronous approach): @nico88desmo said in Using QTcpSocket from multiple threads (Locking/Synchronous approach): . Is it correct? Yes. Or better - simply use signals and slots. But as you don't like the basic Qt stuff - simply use the underlying socket stuff from the os. Between the two solutions, I think I'm going to signal/slot approach ;)
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • error stray '\177' in program when including <QBitMap>

    Unsolved qt5.14.2 qbitmap stray \177
    4
    0 Votes
    4 Posts
    566 Views
    Christian EhrlicherC
    @TheEndlessV Then take a look into the include to see if the file maybe is corrupt
  • Building QT 6.7.0 for Linux: Cmake build options to skip qtwebengine?

    Solved
    3
    0 Votes
    3 Posts
    530 Views
    snukS
    @Christian-Ehrlicher said in Building QT 6.7.0 for Linux: Cmake build options to skip qtwebengine?: @snuk said in Building QT 6.7.0 for Linux: Cmake build options to skip qtwebengine?: configure script has the -skip qtwebengine build option, but I would prefer cmake You can not build Qt6 with anything but cmake so what's wrong with the configure script and this option? There is nothing wrong, but I just wanted to modify a cmake based SlackBuild script. Anyway, the configure-cmake-mapping.md is very helpful. Thanks
  • REQUEST ASSISTANCE IN INTERGRATING CLIPS SOURCE CODE INTO QT CREATOR INTERFACE PROJECT

    Unsolved
    5
    0 Votes
    5 Posts
    326 Views
    RochusR
    @ivanmogapi123 said which uses the clips ide and qt creator for interface design(c++) Do I understand you correctly, that you have a CLIPS based expert system for which you want to build a Qt based GUI? The CLIPS IDE is not identical with the CLIPS VM, but an editor provided to interact with the IDE on Macintosh. So I guess you don't want to integrated the IDE with Qt, but the VM instead. The VM is available as a static or dynamic library which can be integrated with a C++ project (as any other C library). need assistance in integrating clips source code into the qt creator interface I assume you mean the CLP files by "clips source code", i.e. not the source code of the CLIPS VM, isn't it? If so, you first and foremost have to integrate the CLIPS VM with your project (as mentioned it is a C shared or static library). Then you have to add code to your C++ project which interacts with the CLIPS VM, i.e. loads and runs your CLP files and accepts the text output of the VM. But I'm not sure what you mean by "integrate .. into qt creator interface". Does this mean that you would like to use Qt Creator to develop CLP files?
  • How to create desktop manager window in X11?

    Solved
    2
    0 Votes
    2 Posts
    252 Views
    SGaistS
    Hi and welcome to devnet, You might want to check the LXQt project which seem to do what you want already. There might be information there to help you get going.
  • QGraphicsScene and event handling

    Solved qgraphicsscene events removeitem
    5
    0 Votes
    5 Posts
    1k Views
    Q
    @Pl45m4 said in QGraphicsScene and event handling: Due to optimization, not the whole scene is redrawn after operation, so if somehow some painted path/region of a (re-)moved or resized item exceeds the boundingRect, this area might not get updated. Therefore remains might stay visible. This indeed was one problem. The other one was that despite the call to removeItem(), the item stayed in the BSPTree, because the boundingRect changed without a previous call to prepareGeometryChange() (which I had everywhere except in this hidden case). Clearly my fault! Overall, this is not very fault tolerant and also not easy to debug! In a way, it would be nice to have a function that could be called (during debugging) to do some consistency checking, rather than only finding out much later during a paint event.
  • Qt 5.12 to 5.15 => Drag&Drop problems

    Unsolved
    6
    0 Votes
    6 Posts
    447 Views
    SGaistS
    @Poupzo Since you would need to build Qt anyway to use that version, you can take the current latest and apply the patch linked to the bug report.
  • Publish desktop MacOS app in Apple AppStore

    Unsolved xcode macos
    2
    0 Votes
    2 Posts
    444 Views
    SGaistS
    @Dmitriano Hi, Cmake has an Xcode generator. See here for the doc and here for a small example.
  • drawing complex controls

    Unsolved
    7
    0 Votes
    7 Posts
    568 Views
    M
    @happ I mean that you can inherit your style from QProxyStyle instead of QCommonStyle class CustomStyle : public QProxyStyle { public: CustomStyle(cosnt QString styleName): QProxyStyle(styleName) {...} virtual void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *w) const override { switch(cc) { case QStyle::CC_Slider: // draw your slider return; default: QProxyStyle::drawComplexControl(cc,opt,p,w); } } // In the code where you create the slider auto slider = new QSlider(); auto proxy = new CustomStyle(QApplication::style()->name()); proxy->setParent(slider); // take ownership to avoid memleak slider->setStyle(proxy);
  • '_RemotableHandle' type error when trying to use ActiveX in Qt

    Unsolved
    3
    1 Votes
    3 Posts
    335 Views
    G
    @Gao-xiangyang 通过查看 echo '#import "mstscax.dll" named_guids' > import.cpp cl.exe /c /nologo .\import.cpp midl.exe .\mstscax.idl /header mstscax.h /iid mstscax_i.c dumpcpp .\mstscax.tlb By comparing the mstscax.idl file with the .h file generated by dumpcpp, it was found that dumpcpp has issues with handling typedefs, for example: in .idl file typedef [public] _RemotableHandle* wireHWND; typedef union tag__MIDL_IWinTypes_0009 { long hInproc; long hRemote; } __MIDL_IWinTypes_0009; typedef struct tag_RemotableHandle { long fContext; __MIDL_IWinTypes_0009 u; } _RemotableHandle; dumpcpp.exe output .h file // The struct tag_RemotableHandle is declared twice. struct tag_RemotableHandle; struct tag_RemotableHandle;
  • QSqlTableModel - Unable to find table <TABLE_NAME>

    Solved
    11
    0 Votes
    11 Posts
    815 Views
    T
    @Christian-Ehrlicher @Christian-Ehrlicher said in Unable to find table Orders: So you are using another mysql client library version than the server version? Make sure it's the same. 6.5.0 QMySQL plugin could not be compiled against MySQL 8.3.0 libs Alright that's it! I made a new database container using MySQL 8.0 instead of 8.3 and it works as expected. It must be because I built the driver using this previous version of the MySQL client and then at some point I must have made a new container using the latest MySQL image instead of the one compatible with the driver I built. Thanks!
  • QSqlQuery DELETE LIMIT

    Solved
    5
    0 Votes
    5 Posts
    387 Views
    G
    @Christian-Ehrlicher said in QSqlQuery DELETE LIMIT: i Thanks for that advice @Christian-Ehrlicher it's all good now after rebuilding the sqlite plugin. Here's what I did if someone else has to do this... add -system-sqlite into your config.opt file in your QT build directory. run config.status check that in config.summary you see 'yes' for Using system provided SQLite as shown below: Qt Sql Drivers: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. yes OCI (Oracle) ........................... no ODBC ................................... no PostgreSQL ............................. yes SQLite2 ................................ no SQLite ................................. yes Using system provided SQLite ......... yes Then build and install the plugin: make sub-sqlite sudo make install sub-sqlite That's obviously specific to my Linux platform (Ubuntu) so you'd have to adapt as necessary. I think maybe the reason had to do this manually, was that the sqlite3-dev package wasn't installed on my machine at the time QT was built, even though the sqlite3 binaries were there on the system. Before rebuilding QT as shown above, I installed the dev package thus: sudo apt-get install libsqlite3-dev