Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Turkish
  4. İşin içinden cıkamadım 1 haftadır bilen yardım edebilirmi.

İşin içinden cıkamadım 1 haftadır bilen yardım edebilirmi.

Scheduled Pinned Locked Moved Turkish
4 Posts 4 Posters 3.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Huseyin Demirtas
    wrote on 4 Jan 2015, 07:40 last edited by
    #1

    derlemeye uğraştığım programın verdiği hatayı geçemedim bir türlü .
    @
    void MainWindow::toPrintStatusList()
    {
    QPrinter printer;
    QString txt = GRBL_CONTROLLER_NAME_AND_VERSION VERSION_BUILD;
    txt += "\n\n";
    // file title
    txt += ui->filePath->text();
    txt += "\n\n";
    QPrintDialog *dialog = new QPrintDialog(&printer, this);
    if (ui->statusList->textCursor().hasSelection()) {
    dialog->addEnabledOption(QAbstractPrintDialog::PrintSelection);
    printer.setPrintRange(QPrinter::Selection);
    txt += ui->statusList->textCursor().selectedText();
    }
    else {
    txt += ui->statusList->document()->toPlainText();
    }
    if (dialog->exec() == QDialog::Accepted) {
    QTextDocument doc(txt);
    doc.print(&printer);
    }
    }

    // calls : 'ui->btnPrintVisual'
    void MainWindow::toPrintVisual()
    {
    QPrinter printer;
    QString txt = GRBL_CONTROLLER_NAME_AND_VERSION VERSION_BUILD;
    txt += "\n\n";
    // file title
    txt += ui->filePath->text();
    txt += "\n\n";
    QPrintDialog *dialog = new QPrintDialog(&printer, this);
    if (ui->visuGcode->textCursor().hasSelection()) {
    dialog->addEnabledOption(QAbstractPrintDialog::PrintSelection);
    printer.setPrintRange(QPrinter::Selection);
    txt += ui->visuGcode->textCursor().selectedText();
    }
    else {
    txt += ui->visuGcode->document()->toPlainText();
    }
    if (dialog->exec() == QDialog::Accepted) {
    QTextDocument doc(txt);
    doc.print(&printer);
    }
    }
    @

    burda neyin yanlış oldugunu bulamadım veya nasıl düzelticegimi QT 5.4 te yapıyorum.

    Başlarına ( * ) yıldız koydugum satırlar QT de " was not declared in this scope " hatası veriyor.

    Bir fikir verebilcek varsa yardımcı olacak sevinirim.

    [Edited - Please use code tags "@@" - p3c0]

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ckakman
      wrote on 6 Jan 2015, 20:17 last edited by
      #2

      Merhaba,

      Derleyicinin hata mesajlarını ekleyebilir misiniz? Başında * olan herhangi bir satır yok kodda.

      Diğer yandan aldığınız hatanın nedeni ilgli header dosyalarını #include etmemekten kaynaklanabilir.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alper alper
        wrote on 10 Feb 2024, 22:40 last edited by
        #3

        GRBL_CONTROLLER_NAME_AND_VERSION ve VERSION_BUILD
        makrolarını tanımladın mı

        1 Reply Last reply
        0
        • A Offline
          A Offline
          A.A.SEZEN
          wrote on 29 Feb 2024, 20:28 last edited by
          #4

          ilave olarak pro dosyasına aşağıdaki satırı eklediğinizden emin olun.

          QT += printsupport
          
          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved