Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Alignment issue with QTableView text

    Unsolved
    3
    0 Votes
    3 Posts
    439 Views
    Q
    Qt 5.11.2 on Windows. The data comes from a custom variant type. I can't really make a minimal example, unless I strip out my custom types. If I can't figure it out soon I'll try to make an example that duplicates the issue. I did notice that if I set all column's TextAlignmentRole to Qt::AlignRight that the text of the second and third columns disappears off the right side of the column when the table is expanded horizontally, which leads me to believe that there's a discrepancy between the size that's actually visible, and the size that's being used to render/position the text. In the table's resizeEvent() method I have: setColumnWidth(0, width() / 3); setColumnWidth(1, width() / 3); setColumnWidth(2, width() / 3); Which is the only thing I can think of that would be affecting this.
  • QMediaPlayer Seek to a position before playing video

    Unsolved
    8
    0 Votes
    8 Posts
    2k Views
    SGaistS
    You would likely have to fiddle with the backend code.
  • QDockWidget resize ..

    Unsolved
    2
    0 Votes
    2 Posts
    303 Views
    SGaistS
    Hi, That's not really clear. Can you show the code you are using ? Maybe a picture of what you are expecting VS what you are getting ?
  • Parsing large/big text files (quickly)

    Solved
    9
    0 Votes
    9 Posts
    4k Views
    M
    @Christian-Ehrlicher said in Parsing large/big text files (quickly): or maybe even iterate over line with QByteArray::indexOf(' ', oldIdx) // edit: fixed the split to split by space instead \n, thx @mrjj Thank you, I am now using QByteArray::indexOf and what I used to do before in about 2 minutes, now takes about 17 seconds.. thanks again !
  • Looking for a public alternative to QFontEngine::addOutlineToPath

    Unsolved
    2
    0 Votes
    2 Posts
    300 Views
    SGaistS
    Hi, At your own risk but you can enable the use of private APIs. For example QT += gui-private.
  • QNetworkAccessManager advice

    Unsolved
    5
    0 Votes
    5 Posts
    753 Views
    SGaistS
    Yes, it's per QNAM object.
  • Connect my Android HP tablet to Qt Creator

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    tomyT
    Solved! :) The problem was with Windows firewall which prevented the Gradle to download things. I disabled both firewall and antivirus temporarily and tested the program once again. It was for a few minutes just showing lines: download http/ ...... Then it succeeded to show the app on the tablet. :) Then I enabled both firewall and antivirus and tested that and also other programs. No download anymore. It seems that only one time it's required. All apps are shown on the device. :) There's only few tiny red lines (apart from warnings) that make me rather worry. Here's the bottom section of the Output window: [image: 37e229d0-b050-4c08-89d1-3e95643afa91.PNG] Do you have any idea what they are and should they be solved too?
  • How to send project to github

    Unsolved
    5
    0 Votes
    5 Posts
    607 Views
    Pablo J. RoginaP
    @Au7h please don't forget to mark your post as solved. Thanks.
  • Generate open document from template

    Unsolved
    4
    0 Votes
    4 Posts
    790 Views
    SGaistS
    Hi, I think you might be interested by QTextDocumentWriter. Sorry, I misread ODT for ODF.
  • 0 Votes
    3 Posts
    1k Views
    F
    I found a solution. Please see my stackoverflow post.
  • Difficulties creating MySQL plugin for Qt

    Unsolved
    7
    0 Votes
    7 Posts
    873 Views
    SGaistS
    Hi, You didn't follow the guide properly. It says make sub-mysql. The way you did it, you are currently trying to build all the plugins which is not what you're after.
  • QNetworkAccessManager issue

    Unsolved
    4
    0 Votes
    4 Posts
    941 Views
    Christian EhrlicherC
    Is already reported: https://bugreports.qt.io/browse/QTBUG-72463
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • qmake on macos extremely slow via Jenkins(SSH or JavaWebStart)

    Solved macos jenkins
    3
    0 Votes
    3 Posts
    883 Views
    S
    The Jenkins instance is hosted on a different server and is currently connected to several linux slaves that build properly. It's just the macos slave that has the issue. It seems to be slow in both qmake and make steps. We just found a solution that requires us to switch the user to itself before running the command. sudo -u <loggedinuser> -i bash /script/containging/build/commands.sh I'm not sure why this has to be done since we are already logged in as the user that we are switching to. My guess is that Apple enables certain restrictions for remote users.
  • Bug in Qt 5.12 drag n'drop ?

    Unsolved qat 5.12 drag n drop
    57
    0 Votes
    57 Posts
    19k Views
    Christian EhrlicherC
    The bug will be fixed in 5.12.1
  • How to programatically create dynamic pages

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    A
    @mrjj That sounds exactly like what I would like to do, is it possible for you to supply me with some more information on how I could approach this? possibly some pseudo-code or bullet points? What variables would you recommend storing in the controller class and how would you recommend it communicates with the rest of the classes?
  • Qt VNC Client [QVNCClientWidget]

    Solved
    5
    0 Votes
    5 Posts
    3k Views
    ODБOïO
    @mrjj Worked perfectly with ultravnc thank you very much.
  • Reading CSV file through GUI

    Unsolved
    5
    0 Votes
    5 Posts
    873 Views
    beeckscheB
    Hi @kripashree , to open a file use QFile. Following the example on the page MainWindow::onButtonClicked() { QFile file("in.csv"); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) return; while (!file.atEnd()) { QByteArray line = file.readLine(); QList<QByteArray> values = line.split(";"); // depending on your sperator in the csv file // do whatever you want with the values } } The onButtonClicked() function needs to be connected with a signal of your button. In general this connection is set in the constructor of your main window class. Eg: MainWindow::MainWindow() { connect(buttonPointer, &QPushButton::clicked, this, &MainWindow::onButtonClicked); }
  • how to pass an object like LineEdit to a function

    Solved
    2
    0 Votes
    2 Posts
    292 Views
    Christian EhrlicherC
    C++ basics are needed before you start Qt. void myFunc(QLineEdit *lineEditObject) { LineEditObject->settext("some text"); }
  • EventFilter how to ignore mouseMoveEvent when receiving QGestureEvent

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    P
    Refer https://stackoverflow.com/questions/29838086/how-to-disable-mouseevent-during-pinch-zoom for more details.