Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Use XML Schema to Generate XML Documents

    Solved
    2
    0 Votes
    2 Posts
    973 Views
    fcarneyF
    Okay, I think I found the tool I was looking for. In Eclipse with the Web plugin you can literally right click on an xsd file and tell it to generate an xml file that, once it is generated you can add namespaces to the file. From there you can edit the file using a structured editor to add elements that correspond to the schema and various namespaces you added. This allows a structured creation of an xml file from the schema(s) you have selected. Eclipse will also keep validating against the schema so you will show errors if you enter in an incorrect node. So while initially I was looking for a programming solution, I was really looking for a suitably featured xml tool. I am sure there are others out there. I think visual studio has some tools for this.
  • signal in mainWindow and slot in other class

    Solved
    3
    0 Votes
    3 Posts
    405 Views
    ?
    @koahnig it works
  • scxml dynamic load use case

    Solved
    7
    0 Votes
    7 Posts
    791 Views
    W
    Sure did, but that I can see, none of those projects make use of dynamically loading some changed Scxml. Sure, they load one up dynamically, but once it's loaded it's done. Some of the examples even load from a resource file; so to me, that makes it even less dynamic. I did find a use case however that's fairly straightforward: A generic state machine loader that does nothing more than publish known and active states, and processes events. I'd sure appreciate it if you could try to answer some of my outstanding questions here, perhaps with some example. Thanks!
  • Set Headers in Qlistwidget and Qtablewidget

    Unsolved
    7
    0 Votes
    7 Posts
    5k Views
    T
    @jsulm Thanks it works.
  • 0 Votes
    6 Posts
    3k Views
    J
    @aha_1980 @jsulm @SGaist @Kent-Dorfman It all boiled down to store some information in QSettings. Reading a QJsonDocument from QSettings posed an issue, however reading QString from QSettings was possible. Now, I found out how work with QJsonDocument and QSettings, I no longer need to wrong transfer Image in QString. As a work around, I changed Image to Byte Array, changed this Byte Array to hex Array and later changed this Hexed Byte array to QString and stored. But, this is all not required now. Thanks for your inputs.
  • Load dll Library

    Unsolved
    6
    0 Votes
    6 Posts
    651 Views
    A
    @mrjj thank's I knew the problem with myLib.errorString(); @jsulm thank's the path was incorrect
  • This topic is deleted!

    Solved
    17
    0 Votes
    17 Posts
    50 Views
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    12 Views
    No one has replied
  • Resize widgets in a splitter

    Unsolved adjust splitter
    6
    0 Votes
    6 Posts
    2k Views
    N
    I just wanted to locate the splitter so that all the table columns are visible. I tried using QSplitter::setSizes() with the table width but it wasn't updated right after creation. I solved it by overriding the table's resizeEvent() and emitting a signal to the parent widget
  • How to get a list of available image file formats?

    Unsolved
    3
    0 Votes
    3 Posts
    631 Views
    mrjjM
    Hi and also https://doc.qt.io/qt-5/qtimageformats-index.html
  • QTableView delegate insert Error.

    Unsolved
    2
    0 Votes
    2 Posts
    266 Views
    mrjjM
    @Pada_ said in QTableView delegate insert Error.: Motion is created so that you can modify it. What do you mean by that ? Im not sure what you expect/want to happen in B. version.
  • Bug in QAbstractScrollArea or near else

    Unsolved
    5
    0 Votes
    5 Posts
    783 Views
    G
    @mrjj thanx. I have change bug report. PS: The bug appears even when first create list with attached widgets then bind it to QGraphicsWidget on scene.
  • This topic is deleted!

    Solved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • Style the scrollbar of QListView

    13
    0 Votes
    13 Posts
    27k Views
    J
    for qt @Stefan-Monov said in Style the scrollbar of QListView: Hi sNiff3ls. We had the stippled-scrollbar problem in our app too. Solved it with: myWindow->setStyle(new QPlastiqueStyle()) Since we're using CSS to customize the entire look of the app (just like you), making your app use QPlastiqueStyle doesn't affect anything other than the scrollbar stippling (and a few other minor details). If you weren't using CSS, then QPlastiqueStyle would make your app look totally different, but in this case I recommend you just use it as a hack, because QPlastiqueStyle's scrollbar-drawing implementation doesn't use stippling, whereas the default style on windows (QWindowsStyle) does. I consider it a bug in Qt that this is necessary. QScrollBar should be fixed to respect the css fully. 2019 now, in python 3 and pyqt5, use following code: # keys = QStyleFactory.keys() self.setStyle(QStyleFactory.create('Fusion')) refer link here: https://doc.qt.io/qt-5/sourcebreaks.html#changes-to-qstyle https://doc.qt.io/qt-5/qstylefactory.html#create
  • Minimal MacOSX version for Qt.

    Unsolved
    5
    0 Votes
    5 Posts
    434 Views
    N
    @sierdzio Aha! I found https://doc.qt.io/archives/qt-5.7/supported-platforms-and-configurations.html (need change URL for older version)
  • Regarding qApp->thread()->currentThreadId()

    Unsolved
    2
    0 Votes
    2 Posts
    662 Views
    JonBJ
    @Hetal For a question like this you should always state which platform you are on. Google for qt5 threadid. There are a number of hits to read, e.g. https://www.qtcentre.org/threads/2369-How-can-I-get-the-thread-ID-out-of-QThread, https://stackoverflow.com/questions/23452218/proper-use-of-qthread-currentthreadid, others also. https://doc.qt.io/qt-5/qthread.html#currentThreadId Returns the thread handle of the currently executing thread. Warning: The handle returned by this function is used for internal purposes and should not be used in any application code. Note: On Windows, this function returns the DWORD (Windows-Thread ID) returned by the Win32 function GetCurrentThreadId(), not the pseudo-HANDLE (Windows-Thread HANDLE) returned by the Win32 function GetCurrentThread(). I imagine your attempted usage/findings are related to this?
  • QServer slow down the reading of the serial port

    Unsolved qthread qtcpsocket qtcpserver
    9
    0 Votes
    9 Posts
    2k Views
    DoohamD
    I dont know why, but if I set the conexion between server and client first and then I call the function startSerialPort(), the reading speed is the normal. But this method just works with the first conexion. The second conexion already experiment the decrease of the reading speed. void MyServer::startSerialPort() { mipuerto2 = new MySerialPort; msgRec = new MensajeRecibido; msgSent = new MensajeEnviar; connect(mipuerto2, SIGNAL(msgChanged(QByteArray*)), this, SLOT(getMens(QByteArray*))); connect(mipuerto2, SIGNAL(msgChanged(QByteArray*)), this, SLOT(idMensaje(QByteArray*))); connect(msgSent, SIGNAL(tienesMensaje(QString*)), this, SLOT(setRecibido(QString *))); mipuerto2->openSerialPort(); } qDebug()<<socketDescriptor<<"Connecting... "; socket = new MySocket(socketDescriptor); controlador++; QThread *thread = new QThread; qDebug()<<thread->currentThreadId(); connect(this, SIGNAL(mensChanged(QByteArray*)), socket, SLOT(getMsg(QByteArray*))); connect(socket, SIGNAL(mensajeEnviarSocket(QByteArray*)), this, SLOT(sendMens(QByteArray*))); connect(socket, SIGNAL(disconnected()),thread, SLOT(quit()) ); connect(socket, SIGNAL(disconnected()), socket, SLOT(deleteLater())); connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); connect(thread, SIGNAL(started()), socket, SLOT(funcionamiento())); connect(socket, SIGNAL(disconnected), this, SLOT(desconectar())); socket->moveToThread(thread); thread->start(); if(controlador==1){ startSerialPort(); }else if (controlador>1) { mipuerto2->closeSerialPort(); delete mipuerto2; startSerialPort(); }
  • driver not loaded error even after compiling sql plugin for oracle oci.

    Unsolved
    8
    0 Votes
    8 Posts
    2k Views
    jsulmJ
    @rahulvishwakarma Search for plugins/platforms/libqxcb.so and do ldd PATH_TO/libqxcb.so and post the output here.
  • Qt3DExtras: No such file or directory

    Solved
    2
    0 Votes
    2 Posts
    516 Views
    jsulmJ
    @sonichy My guess is: you did not install the package containing it.