Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • [SOLVED] Functionality similar to C#'s Backup.SqlBackup()

    3
    0 Votes
    3 Posts
    2k Views
    D
    Thanks Volker for your answer. I'm trying to create this backup using osql.exe application that is delivered with MSDE2000 and QProcess. Here's the code snippet: @ QProcess *dbBackupProcess = new QProcess(); QStringList args; args << "-Uuser" << "-Ppassword" << "-Sdomain\SQLinstance" << "-Q "BACKUP DATABASE dbName TO DISK = 'E:\backupName.bak'""; dbBackupProcess->start("osql.exe", args); @ This unfortunately doesn't work. What am I doing wrong? Below command ran from the command prompt works good: @osql.exe -Uuser -Ppassword -Sdomain\SQLinstance -Q "BACKUP DATABASE dbName TO DISK = 'E:\backupName.bak'"@ Edit: Okay, never mind. I'm finally getting somewhere. Will post an update soon. Edit#2: I guess I solved it: @ QString command = "osql.exe -UuserName -Ppassword -Sdomain\SQLinstance -Q "BACKUP DATABASE dbName TO DISK = 'E:\backupName.bak'""; int exitCode = QProcess::execute(command); @
  • 0 Votes
    4 Posts
    2k Views
    D
    Thanks; the argc reference was indeed the case - missed it.
  • Undefined reference wheh using QScriptEngine and QScriptValues.

    3
    0 Votes
    3 Posts
    4k Views
    J
    Thanks. You save my day.
  • 0 Votes
    3 Posts
    3k Views
    M
    Even i tried with all exitstatus, but no luck. Finally i have used a batch file with WMIC command inside the batch file. now its working fine. @ QProcess *process = new QProcess(); process->start( "executer.bat" ); // which contains WMIC Path Win32_COMPUTERSYSTEM get Manufacturer,Model /FORMAT:list process->closeWriteChannel(); if( process->waitForFinished() ) { qDebug() << "Succeed: "; QString sResult = QString( process->readAllStandardOutput() ).trimmed(); process->close(); if( !sResult.isEmpty() ) return sResult.split("\n"); } else { qDebug() << "Failed: " << process->errorString(); process->close(); return QStringList(); } @
  • [SOLVED]How to store short in a QByteArray?

    13
    0 Votes
    13 Posts
    10k Views
    S
    @QByteArray ba((const char*)m_output.data(), sizeof(ushort)); const_cast<QByteArray &>(playbackBuffer).append(ba);@
  • Converting unsigned shorts array to QbyteArray

    3
    0 Votes
    3 Posts
    2k Views
    B
    thank u very much for the thread helped me a lot
  • How to toggle four QSplliter layout in a single layout?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • [SOLVED] Application clock

    3
    0 Votes
    3 Posts
    2k Views
    T
    No not what I wanted. It has to run in the backgroun so a simple obj and a timer is what I used and it's solved
  • Drag rows from iTunes into Qt app

    9
    0 Votes
    9 Posts
    4k Views
    G
    You have best chances, if you open a suggestion on the public "bug tracker":https://bugreports.qt-project.org/. Please have a look whether there's already a ticket open on that issue.
  • What may be the cause of the following error while building the code?

    10
    0 Votes
    10 Posts
    6k Views
    L
    Make sure you projects not containing a main function are using a lib template, not app.
  • [solved] Set the style to a file on QPushButton->QMenu

    8
    0 Votes
    8 Posts
    5k Views
    B
    Thank you. tried this option, the shift is there, but not as what I would like to ... Why do not you apply that style that I would like ... I will continue to have to deal with the file QSS.
  • Menubar stops working after it is hidden in full screen mode

    8
    0 Votes
    8 Posts
    4k Views
    L
    Is there anyone out there can fix this issue?
  • Problem with Phonon in release mode

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Change a black pixel into a blue one

    7
    0 Votes
    7 Posts
    9k Views
    I
    Thank you so much !! :-)
  • Position in scene coordinates

    4
    0 Votes
    4 Posts
    8k Views
    S
    also one thing to point out, u should not do all of your stuff in the constructor of your class....,
  • [SOLVED] Hiding File Menu from browser demo

    6
    0 Votes
    6 Posts
    2k Views
    M
    Great! Be sure and label the title as [Solved]. Thanks!
  • QtConcurrent and moveToThread

    8
    0 Votes
    8 Posts
    7k Views
    G
    I know such things, but I have no other proposal then: check each usage and file :-(
  • [SOLVED]Execute function at a specific time

    10
    1 Votes
    10 Posts
    13k Views
    M
    I'll read the current time from a server and then I'll convert it to UTC.Thank you for your help.
  • Question about drag and drop and QListWidget

    2
    0 Votes
    2 Posts
    2k Views
    M
    Hi, As I understand it, each widget handles the cursor as the mouse moves over the widget. Therefore, you'd have to make sure each widget checks the mode you're in and change the displayed 'indicator' as you want it. Hope that helps ;O)
  • [Solved] Drawing a new image from 2 images and check if it is black

    5
    0 Votes
    5 Posts
    3k Views
    I
    Solved thanks. That was the problem that it was a null image.