Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.3k Posts
  • Handling zip and rar files

    Solved
    7
    0 Votes
    7 Posts
    2k Views
    M
    @SGaist I'll be checking out, thank you.
  • How to connect two Qt PC apps over Internet (not locally) using UDP protocol?

    Unsolved
    9
    0 Votes
    9 Posts
    3k Views
    C
    @Pablo-J.-Rogina thank you for this informative answer. The comparison between UDP and TCP in teleopration projects has been done in literature. I don't remember the papers I've read since this was a long time ago. UDP is preferred over TCP due to not simplicity which is a bonus but the fact that delay destablizes Haptic-Teleopereation projects. In the aforementioned projects, delay time injects unwanted energy in the system. The mathematical proof for the preceding fact has been published in the 1980s. You can search more about that in IEEE if you are interested. You are absolutely right about the security issue which is why I'm asking since my background is far away from networking security discipline. I need some guidelines for this matter in order to perform projects in more realistic scenarios. I've done the local networking communication. Now I need to move forward with caution.
  • Access the UI, from multiple windows.

    Solved
    53
    0 Votes
    53 Posts
    17k Views
    mrjjM
    Hi Here is working project. Main issue was you created a NEW mainwindow so the setting_Widget was NOT the same as one where u checked checkbox.. https://www.dropbox.com/s/nhrr9qpv76d1r07/Test_3B.zip?dl=0 I fixed it to give window1 as parameter and use it that way. (as described higher up)
  • QT SQLite with password

    Unsolved
    2
    0 Votes
    2 Posts
    5k Views
    mrjjM
    Hi Nope. Not as far as i know. https://stackoverflow.com/questions/5669905/sqlite-with-encryption-password-protection/5877130#5877130 You must encrypt the database or else any tool will just open it. https://forum.qt.io/topic/37817/using-sqlcipher-in-place-of-sqlite or alternatively http://www.qtcentre.org/threads/35148-Building-QSQLITE-driver-with-AES-256
  • How to add coustem widget to QTableView Model

    Solved
    4
    0 Votes
    4 Posts
    4k Views
    mrjjM
    @AmrCoder Ok, it seems to have WaitingSpinnerWidget(QWidget *parent = 0, bool centerOnParent = true, bool disableParentWhenSpinning = true); try create it with FALSE for centerOnParent as in pinnerProgressBar bar = new SpinnerProgressBar(0, FALSE);
  • How to generate a random string from QStringlist

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    SGaistS
    Hi and welcome to devnet, Do you mean something like: QStringList list{"a", "b", "c", "d"}; std::random_device rd; std::mt19937 g(rd()); std::shuffle(list.begin(), list.end(), g); QString randomString = list.join(""); qDebug() << "Random string:" << randomString;
  • Qt3D adding custom geometry from arrays & creating entities?

    Solved
    2
    1 Votes
    2 Posts
    3k Views
    D
    Wops got sorta lucky, found out updated part of the triangle part: https://code.woboq.org/qt5/qt3d/tests/manual/custom-mesh-cpp-indirect/main.cpp.html Except that triangle normals are flipped and messed up ;- ) humh the longer I look at it the less I like it, I think this is old/outdated way of adding meshes to the scene. Just by going here https://doc.qt.io/qt-5.10/qt3drender-qbuffer-obsolete.html we can see that they marked the 2 buffers we made as absolute. So I'm fairly sure this is NOT the way to do it.
  • Using a Qt application as a library

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    mrjjM
    Hi Ok but if the parsing code uses anything Qt, it might not like to be created with no QApplication object. QMake is a make maker. So its already generic. As much as CMake. If you look in the build folder, you will see it creates a normale MakeFile.
  • Set to background Button on Label like C#

    Unsolved
    20
    0 Votes
    20 Posts
    4k Views
    J.HilkJ
    @ZekDe I said previously that this trick only works with a QGridLayout if you call addwidget to a horizontal layout, that will always append the widget!
  • How to choose compiler and kit

    Unsolved kit windows compile
    3
    0 Votes
    3 Posts
    4k Views
    mrjjM
    Hi Do you really need that many kits installed ?? Desktop QT 5.6.2 MinGW 32bit -> can make normal win32 apps in 32 bit. Run on win 10 64 bit too ( as 32 bit) Desktop QT 5.6.2 MSVC2013 32bit. -> 32 bit, you must install compiler yourself. VS 2013 ONLY ( runs on 64 bit too) Desktop QT 5.6.2 MSVC2013 64bit -> 64 bit, you must install compiler yourself. VS 2013 ONLY ( runs ONLY 64 bit ) Desktop QT 5.6.2 MSVC2015 32bit -> 32 bit, you must install compiler yourself. VS 2015/17 ONLY ( runs on 64 bit too) Desktop QT 5.6.2 MSVC2015 64bit -> 64 bit, you must install compiler yourself. VS 2015/17 ONLY ( runs ONLY on 64 bit) Desktop QT 5.6.2 for Universal Windows Patform 32bit Not a Desktop app. WinRT only app Desktop QT 5.6.2 for Universal Windows Patform 64bit Not a Desktop app. WinRT only app Sounds to me you can just use mingw. for both 32/64 bit unless you want app to be 64 bit ?
  • Help with QThread

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    Z
    Hmm... checked the elapsed time for that function and it is 1ms or less. The problem is obviously somewhere else. I'm on OSX and the activity monitor shows I have lots of idle wakeups - could the OS be slowing things down? Best wishes Ziggx
  • QDockWidget border setting not working as expected

    Unsolved
    1
    0 Votes
    1 Posts
    583 Views
    No one has replied
  • QSerialPortInfo::availablePorts() freeze for ~30s

    Solved
    12
    0 Votes
    12 Posts
    3k Views
    H
    I'm pretty sure I use udev. However, it looks there was a bug somewhere that got fixed because after the latest system update from Manjaro, the issue has disappeared. No kernel or udev update though, so I am not sure what was at cause or what fixed it. Anyway, I guess this can be considered solved, thanks a lot for the support.
  • toHtml of QWebEnginePage always return empty string

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    JonBJ
    @tham This is a bit of a necro, but for anyone coming across this I believe this is not a bug but is addressed by understanding & following https://stackoverflow.com/questions/45363190/get-html-from-qwebenginepage-in-qwebengineview-using-lamda
  • Application crashed when run as Administrator

    Unsolved
    2
    0 Votes
    2 Posts
    390 Views
    mrjjM
    Hi Kinda sounds like this https://bugreports.qt.io/browse/QTBUG-48973 But you should test your deployment folder on another machine to be sure its Qt related and not just that machine.
  • read access violation when splitting QString in QVariantMap initialization

    Unsolved
    9
    0 Votes
    9 Posts
    2k Views
    JonBJ
    @J.Hilk Yes indeed, though I suspect OP doesn't want to write that on each line. His question remains why one way of writing his code works and another faults.
  • How to populate a dataframe in a QDialog using PyQT

    Unsolved
    24
    0 Votes
    24 Posts
    10k Views
    JonBJ
    @Piyush OK, so I don't know what all the earlier discussion was about, but a QTableWidget is simply a QWidget like any other widget, and I presume you know how to add widgets to dialogs. Your code will look like: dlg = QDialog() tbl = QTableWidget() dlg.addWidget(tbl) tbl.setHorizontalHeaderLabels(...) tbl.setRowCount(...) tbl.setColumnCount(...) ... item = QTableWidgetItem(...) tbl.setItem(m, n, item) If you want to create a dedicated dialog for this, you might go: class MyDialog(QDialog): def __init__(self, parent=None): super().__init__(parent) self.tbl = QTableWidget() self.addWidget(self.tbl) self.tbl.setHorizontalHeaderLabels(...) self.tbl.setRowCount(...) self.tbl.setColumnCount(...) ... item = QTableWidgetItem(...) self.tbl.setItem(m, n, item) That's the skeleton outline. As @jsulm says, you need to create the actual rows/columns in the table (tbl.setRow/ColumnCount()) to hold the QTableWidgetItems you create.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • Customizing QFileDialog

    Unsolved
    6
    0 Votes
    6 Posts
    4k Views
    JonBJ
    @Pablo-J.-Rogina Hmm, fair enough! The customization is only for the Qt dialog, not the native one, so you have to be prepared to use that. The post code also ends with: I cannot choose a file anymore. I can select a file, but no file is displayed in the "File Name" QLineEdit and the "OK" Button is disabled. So I hope that was settled via: Maybe also needs to implement mapFromSource/mapToSource?
  • Unable to pass QModelIndex to a function due to some C++ constrait

    Solved
    3
    0 Votes
    3 Posts
    1k Views
    jsulmJ
    @scotryder said in Unable to pass QModelIndex to a function due to some C++ constrait: CanBeFilter(&index0, &canReturn); You're trying to pass pointers where references are expected. Change it to: CanBeFilter(index0, canReturn); And as @Taz742 pointed out make first parameter const. In addition CanBeFilter should return the result instead of modifying a parameter: bool FilterProxyModel::CanBeFilter(const QModelIndex &index) const; bool canReturn = CanBeFilter(index0);